[Haskell-cafe] Relaxing atomicity of STM transactions
brandon_m_moore at yahoo.com
Tue Sep 28 22:19:49 EDT 2010
On Sep 28, 2010, at 6:36 PM, Tom Hawkins <tomahawkins at gmail.com> wrote:
Thanks for the responses, but I think I should explain a bit more.
I'm not interested in being able to read the live value of a TVar at
any arbitrary time (via. unsafeIOToSTM). But rather I would like
looslyReadTVar to have exactly the same semantics as readTVar, except
that the STM runtime would not reject the transaction if the TVar is
modified by another transaction before the atomic commit takes place.
Given the current implementation, I think the easiest way to get those semantics is to lift the untracked readTVarIO into STM with unsafeIOToSTM.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe