[Haskell-cafe] MState: A consistent State monad for concurrent applications

Nils Schweinsberg ml at n-sch.de
Fri Jul 2 12:21:21 EDT 2010


I have been trying to use the State monad for concurrent applications 
and came up with a little library.[1] My "MState" uses an IORef to 
maintain the state between different threads. The library also offers a 
simple way to fork off new threads using its own "forkM" function. This 
function will asure that every thread in an "evalMState"/"execMState" 
call will be finished before the final result is returned.

The library is also on github.com.[2] Please let me know what you think 
of it and whether or not I should put it on hackage.

Nils Schweinsberg

[1] http://n-sch.de/hdocs/mstate/Control-Concurrent-MState.html
[2] http://github.com/mcmaniac/mstate

More information about the Haskell-Cafe mailing list