David Roundy wrote:

Yes, that should all be fine, because the IORef is only modified from one thread, and read from the other(s). If you were modifying the IORef from more than one thread you would need to use atomicallyModifyIORef, or MVars.

If I did modify the IORef from more than one thread (e.g. if a bug were
introduced), would this cause any trouble other than occasional missed
updates or reads of wrong data?

It shouldn't, no.

Cheers,
        Simon
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to