3 ms·
> In any language with any concurrency support there's a point where you spin up a bunch of threads to do something. No, that's not true. Think javascript (and
by valenterry 5y ago
> In any language with any concurrency support there's a point where you spin up a bunch of threads to do something.
No, that's not true. Think javascript (and I hate javascript): you can do concurrency even though you literally don't have a way to spin up a thread in the browser.
- devoutsalsa 5y agoErlang was originally designed to have a great concurrency model that ran on a single core CPU! Preemptive scheduling is super cool!
- ksbrooksjr 5y agoYou actually can spin up a background thread in the browser now using web workers[0]. Although, like you mentioned, you don't actually need threads for concurrency. The event loop handles concurrency even in a single threaded environment. [0] https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers...