state threads

John Meacham john at
Mon Apr 3 02:08:02 EDT 2006

In case anyone was wondering what this state-threads thing I keep
talking about is, here is a sample implementation (in C) as well as a
lot of documentation and FAQs that apply to haskell as well.

it should be noted that the chief disadvantage of state threads in C is
not an issue for haskell (requiring an alternate IO library)

A form of state threads can be implemented in pure haskell using the Poor Man's
Concurrency monad described here:
assuming you have the ability to use an 'epoll' or 'select' mechanism.
However, this is probably not a suitable implementation method for high
performance haskell implementations and does not address foreign
concurrent calls.

John Meacham - ⑆⑆john⑈

More information about the Haskell-prime mailing list