Hacker News new | ask | show | jobs
by flaviut 1124 days ago
I've never worked with Web Workers, but the doc page mentions them at the very top. Isn't that the intended workaround? Have a background thread that receives the events & coordinates, rather than having each page deal with them?
1 comments

Yes, that's `ShardedWorker`.
I wanted so use these in a project recently, only to find out that they aren't supported on Chrome for Android. This makes them non-usable for me, since there is no drop-in polyfill available yet.
If you are doing websocket in there, you could fall back to main thread, but it comes at the cost of code duplication.