3 ms·
Webworkers run on their own thread. The point of this is to run low-priority tasks without impacting the main loop, and without the complexity of separate thre
by balls187 4y ago
Webworkers run on their own thread.
The point of this is to run low-priority tasks without impacting the main loop, and without the complexity of separate threads.
- mfbx9da4 4y agoIf the task is a long running expensive task, it's going to block the main thread from being responsive to user input. If it's a quick task then you don't need to schedule it. I struggle to see the place for a medium length task which is long enough that it needs to be deferred but short enough that it can't be executed immediately. What would be an example?
- balls187 4y agoSending telemetry data. It’s low priority, and perhaps it’s quick, but there is no reason it can’t when idle.