2 ms·
I'm not sure I follow the bit about convincing myself. Going back to square one again with a setTimout/event loop renders much of the use of workers pointless,
by Lerc 11y ago
I'm not sure I follow the bit about convincing myself. Going back to square one again with a setTimout/event loop renders much of the use of workers pointless, you are stuck back at the same restrictions as main thread JavaScript.
I agree pre-emption would allow this without shared data structures. It just seems that the solution we will be given in the end will be a shared model.
http://lars-t-hansen.github.io/ecmascript_sharedmem/shmem.html http://lars-t-hansen.github.io/ecmascript_sharedmem/shmem.ht...
- geocar 11y agoYou can get a lot of mileage out of specialised solutions, and I suspect we'll continue to see those instead of a shared model; in an answer to your question about finding prime numbers, simply kill the worker and start another one with a new initial state.