Correct the swapMVar haddock doc
authorIan Lynagh <igloo@earth.li>
Tue, 14 Aug 2007 14:50:28 +0000 (14:50 +0000)
committerIan Lynagh <igloo@earth.li>
Tue, 14 Aug 2007 14:50:28 +0000 (14:50 +0000)
Control/Concurrent/MVar.hs

index fc3a30a..a5dc267 100644 (file)
@@ -59,7 +59,12 @@ readMVar m =
     putMVar m a
     return a
 
--- |Atomically, put a new value into an 'MVar' and return the old value.
+{-|
+  Take a value from an 'MVar', put a new value into the 'MVar' and
+  return the value taken. Note that there is a race condition whereby
+  another process can put something in the 'MVar' after the take
+  happens but before the put does.
+-}
 swapMVar :: MVar a -> a -> IO a
 swapMVar mvar new =
   block $ do