How to allow Web Workers to receive new data while it still performing computation?

Even though the Worker works on an other thread than the one of your main page, and can thus run continuously without blocking the UI, it still runs on a single thread. This means that until your sort algorithm has finished, the Worker will delay the execution of the message event handler; it is as … Read more