Skip to content
Discussion options

You must be logged in to vote

I invested some effort into creating a worker

it's literally:

<script type="py" src="./your_code.py" worker></script>

what was difficult?

Also, when non-NumPy, GIL-holding code like Image.resize() is running, main thread still freezes

without any code or minimal reproducible example, it's hard to guess/help but I believe you are resizing via DOM elements?

I can write a while True: pass loop in a worker and the main thread would always be responsive so I am pretty sure you are not using a worker or not computing within the worker.

I use Pyodide both in main thread and in a worker

usually the ideal scenario is MicroPython on the main thread for fast bootstrap and Pyodide workers. If y…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@jolaf
Comment options

@WebReflection
Comment options

@jolaf
Comment options

@jolaf
Comment options

Answer selected by jolaf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants