On Sep 28, 2010, at 6:36 PM, Tom Hawkins <tomahawk...@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.


      
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to