4 ms·
Some languages manage to have a really nice blend between OS threads and lightweight concurrency. Erlang/Elixir can spin up hundreds of thousands of lightweight
by actsasbuffoon 11y ago
Some languages manage to have a really nice blend between OS threads and lightweight concurrency. Erlang/Elixir can spin up hundreds of thousands of lightweight "processes" (their word for green threads), which get split up between a number of real OS threads by schedulers. It means you can have great performance on IO with green threads, but also have great performance on CPU bound tasks with honest-to-goodness threads.
Clojure's core.async can pull off the same trick, though I don't know as much about how it works.