[Haskell-cafe] STM commit hooks

Joel Reymont joelr1 at gmail.com
Mon Dec 12 06:07:43 EST 2005


Missed this reply. My bad and apologies to Simon.

Einar, did it work for you?

On Dec 2, 2005, at 11:15 AM, Simon Marlow wrote:

> How about this:
>
>   log_lock <- newTMVar ()
>
>   atomically3 h act = do
>     atomically (do act; takeTMVar log_lock `orElse` abort h)
>     hPrint h Commit
>     atomically (putTMVar log_lock ())
>
> does that work?

--
http://wagerlabs.com/







More information about the Haskell-Cafe mailing list