Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Web workers are real concurrency and afaik, there is no GIL that spans across the main thread and the worker threads in any of the browser implementations of web workers.


The limitation with Web Workers is that the main worker thread is the only one that can interact with the DOM.


Why would you want multiple threads touching the UI? Android processes for instance only have one UI thread.


Updating is different than reading. Having concurrent reads would be a good thing.


I do not see a big benefit from that. Reading from the DOM will already be fast and can be handled in one thread. And you won't have concurrent reads if another thread is writing to the DOM.

I think the designers of web workers made this decision thoughtfully. Other environments like iOS and Android only have one UI thread as well.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: