3 ms·
The main benefit here will be realized in Shared Workers. Unfortunately Edge support is "not planned" and WebKit support is "removed" http://caniuse.com/#feat=s
by caleblloyd 10y ago
The main benefit here will be realized in Shared Workers. Unfortunately Edge support is "not planned" and WebKit support is "removed" http://caniuse.com/#feat=sharedworkers http://caniuse.com/#feat=sharedworkers
I guess it may come in handy for Electron apps.
- chrismorgan 10y agoYou don’t need Shared Workers to benefit from this. I haven’t ever actually used Shared Workers, but as I understand it the normal sort of case for them could be polyfilled without too much difficulty. Using Web Workers instead of Shared Workers just means that any actual communication beyond the shared memory must be posted via the instantiator of the worker.
- streptomycin 10y agoYou're right about Shared Workers not being needed for this, but just to continue going off on a tangent... I think a polyfill would be pretty difficult. First you have to make sure only one tab starts a Web Worker. Maybe that's not impossible, but it's tricky. And then the real difficulty... when the tab that spawned the Web Worker closes while another tab is open, you'd need to spawn another Web Worker in that tab and copy the state of the first Web Worker to the second Web Worker before the first one is destroyed by the browser. Not sure if that's possible.
- the8472 10y agoYou can use broadcastchannel to coordinate multiple tabs and workers. And I think once you receive a message from such a channel you get a proxy for the sender, which means you can establish a 1-1 channel, which in turn means you can can transfer objects like sharedarraybuffer.
- deleted 10y ago[deleted]