4 ms·
>> Task.start(...) > I almost never use task, because I like certainty. I've been bitten too badly by people using it who didn't understand it. I don't like ha
by rkangel 5y ago
>> Task.start(...)
> I almost never use task, because I like certainty. I've been bitten too badly by people using it who didn't understand it. I don't like having to explain `Enum.each(tasks, &Task.start/1 )` is going to screw up your order of operations to someone who doesn't get it.
I don't understand this. In any language with any concurrency support there's a point where you spin up a bunch of threads to do something. That's a useful capability and developers should understand it. If you don't know Elixir then you need to learn what Task does, but that's true in any language.
- 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...