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
Tomasz
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to