git.iko.soy/distributed-process
on master help sign in
Merge pull request #170 from tweag/cqueue-fix
58ef3bfTim Watson
src/Control/Distributed/Process/Internal/CQueue.hs+2−2
@@ -101,7 +101,7 @@ dequeue :: forall m a.
101 -> BlockSpec -- ^ Blocking behaviour
101 -> BlockSpec -- ^ Blocking behaviour
102 -> [MatchOn m a] -- ^ List of matches
102 -> [MatchOn m a] -- ^ List of matches
103 -> IO (Maybe a) -- ^ 'Nothing' only on timeout
103 -> IO (Maybe a) -- ^ 'Nothing' only on timeout
104−dequeue (CQueue arrived incoming) blockSpec matchons =
104+dequeue (CQueue arrived incoming) blockSpec matchons = mask_ $
105 case blockSpec of
105 case blockSpec of
106 Timeout n -> timeout n $ fmap fromJust run
106 Timeout n -> timeout n $ fmap fromJust run
107 _other ->
107 _other ->
@@ -115,7 +115,7 @@ dequeue (CQueue arrived incoming) blockSpec matchons =
115 where
115 where
116 chunks = chunkMatches matchons
116 chunks = chunkMatches matchons
117
117
118− run = mask_ $ do
118+ run = do
119 arr <- takeMVar arrived
119 arr <- takeMVar arrived
120 let grabNew xs = do
120 let grabNew xs = do
121 r <- atomically $ tryReadTChan incoming
121 r <- atomically $ tryReadTChan incoming