I don’t see any documentation on this. I see the worker thread has a wait for time coded specifically to hog CPU as noted. I think this needs some sort of explanation of what it’s doing.
I had to look this one up.
It was originally contributed by Christian Probst on our old web board in 2012. The only other mention of it was on 2014 when a user in South Africa played with it.
Given its age and the amount of new stuff which has been done with JavaScript WebWorkers in the past 8 years, the example may no longer be relevant.