[Haskell] Re: [Haskell-cafe] SimonPJ and Tim Harris explain STM - video

Tomasz Zielonka tomasz.zielonka at gmail.com
Fri Nov 24 04:11:42 EST 2006

On Fri, Nov 24, 2006 at 10:02:59AM +0100, Tomasz Zielonka wrote:
> That's where retryWith would help. Right now I am using something named
> autonomous transactions:
>     autonomously :: Bool -> STM a -> STM ()
> This basically forks a new thread to perform the given transaction
> outside of the current transaction.

Forgot to explain this Bool parameter: it controls whether the enclosing
transaction is waiting for the autonomous transaction to finish. I don't
really like this idea, but it allowed to gain some small efficiency
advantage, decreasing the number of retries.

Best regards

More information about the Haskell-Cafe mailing list