2 ms·
> Haskell threads can be preempted externally - this allows you to ensure they never leak. Vs a goroutine that can just spin forever if it doesn't explicitly yi
by kbolino 2y ago
> Haskell threads can be preempted externally - this allows you to ensure they never leak. Vs a goroutine that can just spin forever if it doesn't explicitly yield.
Goroutines are preemptible by the runtime (since https://go.dev/doc/go1.14#runtime https://go.dev/doc/go1.14#runtime) but they're still not addressable or killable through the language itself.
- whateveracct 2y agoThe GHC runtime has lots of cool concurrency features. Async exceptions as a way to pass messages (and kill threads!) Allocation limits for threads. Software Transactional Memory.