3 ms·
When you say "they", I assume you mean "browsers"? Sorry for the dumb question. I know precious little about web programming and concurrency.
by 7thaccount 7y ago
When you say "they", I assume you mean "browsers"? Sorry for the dumb question. I know precious little about web programming and concurrency.
- Izkata 7y agoExcept for webworkers (relatively new, I've not used them and know little about them), javascript in browsers is single-threaded. Even asynchronous things like ajax requests can only handle the result once the thread finishes doing whatever it was doing.
- 7thaccount 7y agoInteresting and thanks for the explanation. Does it have to be single threaded?
- ProfHewitt 7y agoJavaScript in browsers was decreed by the standards committee to be single-threaded forever. Consequently, JavaScript is entirely lacking in concurrency constructs, e.g., implementing a region of mutual exclusion inside a JavaScript program.
- 7thaccount 7y agoThanks! I assume that was for a reason? Or just oversight?