Mapping Web Workers onto Tokio tasks using the multithreaded RT? #11806
mwcampbell
started this conversation in
Ideas
Replies: 2 comments 2 replies
-
This is against the spec, which says that each worker should have its own thread. Additionally all of Deno worker infrastructure is written in a way that doesn't allow moving workers (ie. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Where exactly is that in the spec? On a cursory skim, the only actual references to threads are in non-normative sections. The inability to move V8 isolates between threads seems like the main issue to me. Is that a limitation of V8 itself, or just Deno? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Perhaps this has already been discussed elsewhere and I've just missed it, but I wonder if it would be worthwhile to use a single instance of the Tokio multithreaded runtime for all of Deno, and spawn workers as Tokio tasks rather than dedicated threads. Then one could experiment with things like spawning a worker per HTTP request, for increased isolation, without incurring the overhead of an OS thread for each worker.
Beta Was this translation helpful? Give feedback.
All reactions