Comment on Async/await support in FirefoxparentComments−EdSharkey9yI suppose if you could only crunch numbers in a Web Worker and then make a clone to get it back to the DOM thread where it would be used, then yeah, Web Workers would be bleh. But, it's not as bad as all that!For example, transferables let you move bulk data between threads without cloning. At least that removes most of the communication overhead. https://developer.mozilla.org/en-US/docs/Web/API/Transferabl...On firefox you can transfer your WebGL canvas to a Web Worker, how is that for useful? https://hacks.mozilla.org/2016/01/webgl-off-the-main-thread/You can use Web Sockets in Web Workers in very recent Firefox (48+?) and Chrome versions. https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers... And you've always been able to do AJAXy things on Web Workers as well.I'm not saying the API's are clean or lovely, but the multithreaded functionality is there for the taking.−bzbarsky9yYou can use Web Sockets in Web Workers in very recent Firefox (48+?)38+. It's been shipping for a year and a half.−EdSharkey9yOff by 10 errors are my specialty!!Good to know it's stable for awhile, thanks for the update. Go Mozilla, go!!
Comments
I suppose if you could only crunch numbers in a Web Worker and then make a clone to get it back to the DOM thread where it would be used, then yeah, Web Workers would be bleh. But, it's not as bad as all that!
For example, transferables let you move bulk data between threads without cloning. At least that removes most of the communication overhead. https://developer.mozilla.org/en-US/docs/Web/API/Transferabl...
On firefox you can transfer your WebGL canvas to a Web Worker, how is that for useful? https://hacks.mozilla.org/2016/01/webgl-off-the-main-thread/
You can use Web Sockets in Web Workers in very recent Firefox (48+?) and Chrome versions. https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers... And you've always been able to do AJAXy things on Web Workers as well.
I'm not saying the API's are clean or lovely, but the multithreaded functionality is there for the taking.
38+. It's been shipping for a year and a half.
Off by 10 errors are my specialty!!
Good to know it's stable for awhile, thanks for the update. Go Mozilla, go!!