3 ms·
That would be JavaScript.
by dboreham 5y ago
That would be JavaScript.
- halfmatthalfcat 5y agoWebWorkers changed that in the browser. Could have always spawned child processes in Node or via utilities like PM2.
- furstenheim 5y agoExcept you can do different IO operations in the same user thread. Parallelizing calls without synchronicity problems
- tlhunter 5y agoYou might enjoy Multithreaded JavaScript ;)
- hnbad 5y agoNot really? On a language level, sure, but with native IO, web workers, shared memory and Node.js clusters, I don't think it's fair to say JavaScript has no concurrency.
- samus 5y agoJavascript APIs expose callback interfaces, and the callbacks are called on the thread that scheduled it. The real concurrency happens behind the scenes and is handled by the browser. So no, Javascript is not single-threaded in practice.