
28 Dec
2005
28 Dec
'05
1:38 p.m.
On Wed, Dec 28, 2005 at 05:28:28PM +0000, Chris Kuklewicz wrote:
But STM, wrapped in small pieces, makes for interesting IO commands (untested):
waitForZero :: (Num a, Ord a) => (TVar a) -> IO () waitForZero tv = atomically $ do v <- readTVar tv when (v>0) retry
This function is rather useless in IO - you will get race conditions. That's what you get for leaving the STM wonderland ;-) Best regards Tomasz -- I am searching for a programmer who is good at least in some of [Haskell, ML, C++, Linux, FreeBSD, math] for work in Warsaw, Poland