
24 Nov
2006
24 Nov
'06
4:11 a.m.
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