diff options
Diffstat (limited to 'libraries/base/Control/Concurrent/Chan.hs')
-rw-r--r-- | libraries/base/Control/Concurrent/Chan.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libraries/base/Control/Concurrent/Chan.hs b/libraries/base/Control/Concurrent/Chan.hs index 874e48a1a1..1599ae3048 100644 --- a/libraries/base/Control/Concurrent/Chan.hs +++ b/libraries/base/Control/Concurrent/Chan.hs @@ -105,7 +105,7 @@ writeChan (Chan _ writeVar) val = do -- Throws 'Control.Exception.BlockedIndefinitelyOnMVar' when the channel is -- empty and no other thread holds a reference to the channel. readChan :: Chan a -> IO a -readChan (Chan readVar _) = do +readChan (Chan readVar _) = modifyMVar readVar $ \read_end -> do (ChItem val new_read_end) <- readMVar read_end -- Use readMVar here, not takeMVar, |