ClosureWorker Demo

This demo demonstrates the power of using a WebWorker to exceute blocking tasks.
In this demonstration we will do 3 million iterations of a prime number algorithm.

The first option will do this without a WebWorker, and will cause the UI thread of this tab to block for a few seconds.
The second option will do the exact same thing, but in a separate thread using a WebWorker compiled with ClosureWorker.

Notice this clock. It will freeze when the first option is running, but not with the second.