2 ms·
Haskell does not even allow one to write sequential code. The IO monad enforces sequence on IO operations, and when you fork it, you get a new, independent seq
by marcosdumay 10y ago
Haskell does not even allow one to write sequential code.
The IO monad enforces sequence on IO operations, and when you fork it, you get a new, independent sequence of IO operations to play with, not a new thread.
Haskell is really great for concurrent programming. Not only because of green threads (the mainstream concept that is nearest to the IO monad), but because of the "everything is immutable" rule, and very powerful primitives available.