4 ms·
At least Python has multithreading (even though it has the GIL). JavaScript only has some kind of decoupled worker processes that can communicate only through a
by amelius 8y ago
At least Python has multithreading (even though it has the GIL). JavaScript only has some kind of decoupled worker processes that can communicate only through a narrow message channel, or through a low level shared memory array.
- pjmlp 8y agoWorklets are going to add more paralelism to JavaScript.
- amelius 8y agoTheir usefulness is very restricted. What we want instead is: - general concurrency - access to any (garbage collected) JS variable/object from any thread. - a garbage collector that works across all threads. - no global locking of threads by the runtime system
- jnwatson 8y agoAnd then you get into the problem that Python has. The reason why Python has the GIL is that all of those things are really hard to do right in a performant way. I think JS is making the right call here: a small subset just to engage the extra cores.