Peter Robinson
Sun, 27 Dec 2009 09:54:28 -0800
A new announcement, as the interface has changed quite a bit (e.g. 'onRetry' is gone) and previous versions had a rare but annoying bug due to the unpredictability of 'unsafeIOToSTM'.
>From the package description: ----- This library provides an STM monad with commit and retry IO hooks. A retry-action is run (at least once) if the transaction retries, while commit-actions are executed iff the transaction commits. The AdvSTM monad also gives some atomicity guarantees for commit-actions: * When a TVar is modified in a transaction and this transaction commits, the update remains invisible to other threads until the corresponding onCommit action is run. * If the onCommit action throws an exception, the original values of the modified TVars are restored. Note: This library was inspired by the AdvSTM monad on the Haskell Wiki (see http://haskell.org/haskellwiki/?title=New_monads/MonadAdvSTM). Feedback is welcome! ----- _______________________________________________ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell