On Tue, Dec 16, 2008 at 5:54 AM, Luke Palmer <lrpalmer@gmail.com> wrote:
Okay, that's a bit clearer. Control.Parallel is not what you want; that is for parallelizing pure code (and is very nice inside its little domain). But you want concurrent code: multiple threads that change state at the same time. That is in Control.Concurrent.
In particular, the "shared variable" is Data.IORef.
Simple example from which you should be able to extrapolate.