Re:A Taste of JavaScript's New Parallel Primitives
by _yosefk on Friday May 06, 2016 @10:43AM
(#11644297)
For (1) does this mean that everything in the global namespace barfs when called from a worker thread?
(2) sounds like it might need a larger set of primitives, though I'm not sure.
Re:A Taste of JavaScript's New Parallel Primitives
by AgentME on Friday May 06, 2016 @07:28PM
(#11647462)
1. Web workers don't share a javascript namespace or anything with the parent page. They're like a brand new page (that happens to not have a DOM). Outside of SharedArrayBuffer, there's no shared memory.
2. I assume it was done at a low level so that multi-threaded C++ could be compiled to javascript (asm.js/WebAssembly).