[commit: stm] master: isEmptyTMVar: remove bogus comment, cut and pasted from isEmptyMVar (57bec25)
Simon Marlow
marlowsd at gmail.com
Wed Nov 23 10:27:54 CET 2011
Repository : ssh://darcs.haskell.org//srv/darcs/packages/stm
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/57bec25b77760f3eba078b3146b31db8269f29b8
>---------------------------------------------------------------
commit 57bec25b77760f3eba078b3146b31db8269f29b8
Author: Simon Marlow <marlowsd at gmail.com>
Date: Tue Nov 22 16:42:52 2011 +0000
isEmptyTMVar: remove bogus comment, cut and pasted from isEmptyMVar
>---------------------------------------------------------------
Control/Concurrent/STM/TMVar.hs | 5 -----
1 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/Control/Concurrent/STM/TMVar.hs b/Control/Concurrent/STM/TMVar.hs
index 653736f..698673a 100644
--- a/Control/Concurrent/STM/TMVar.hs
+++ b/Control/Concurrent/STM/TMVar.hs
@@ -140,11 +140,6 @@ swapTMVar (TMVar t) new = do
Just old -> do writeTVar t (Just new); return old
-- |Check whether a given 'TMVar' is empty.
>---------------------------------------------------------------
--- Notice that the boolean value returned is just a snapshot of
--- the state of the 'TMVar'. By the time you get to react on its result,
--- the 'TMVar' may have been filled (or emptied) - so be extremely
--- careful when using this operation. Use 'tryTakeTMVar' instead if possible.
isEmptyTMVar :: TMVar a -> STM Bool
isEmptyTMVar (TMVar t) = do
m <- readTVar t
More information about the Cvs-libraries
mailing list