Re:Computing with JavaScript Web Workers
by TweedHeads on Wednesday July 22, 2009 @01:38PM
(#718216)
Point taken, then let me rephrase that.
Threads we can fire and forget. Threads we can start "inside" our script and let them work while we do other stuff.
myfunnyfunc = function(){/* do long funny stuff */}
mycallback = function(){/* do something when done */}
mythread = new Thread(myfunnyfunc,mycallback);
Asynchronous like xmlhttprequest, just a way to replace the "settimeout" hack.
On the other hand, allowing for an easy way to call global functions of the child worker would be really nice.
Child Worker: That would be sexy and surely simplify a lot of logic surrounding message passing.