Skip to content

Comment on Async/await support in Firefoxparent

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.

You can use Web Sockets in Web Workers in very recent Firefox (48+?)

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!!

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.