git.iko.soy/distributed-process
on master help sign in
Prevent timeouts from losing messages.
commit3e44157e9bd3a26a4bd445264644b206b41f39a8 authorFacundo Domínguez <facundo.dominguez@tweag.io> dateMon 5 Jan 2015, 15:17 (12 years ago) parent87309ac
1 file changed+2−2
src/Control/Distributed/Process/Internal/CQueue.hs+2−2
src/Control/Distributed/Process/Internal/CQueue.hs+2−2
@@ -101,7 +101,7 @@ dequeue :: forall m a.
101101 -> BlockSpec -- ^ Blocking behaviour
102102 -> [MatchOn m a] -- ^ List of matches
103103 -> IO (Maybe a) -- ^ 'Nothing' only on timeout
104−dequeue (CQueue arrived incoming) blockSpec matchons =
104+dequeue (CQueue arrived incoming) blockSpec matchons = mask_ $
105105 case blockSpec of
106106 Timeout n -> timeout n $ fmap fromJust run
107107 _other ->
@@ -115,7 +115,7 @@ dequeue (CQueue arrived incoming) blockSpec matchons =
115115 where
116116 chunks = chunkMatches matchons
117117
118− run = mask_ $ do
118+ run = do
119119 arr <- takeMVar arrived
120120 let grabNew xs = do
121121 r <- atomically $ tryReadTChan incoming