@@ -295,15 +295,16 @@ cpEnableTraceRemote =
295295-- | @delay them p@ is a process that waits for a signal (a message of type @()@)
296296-- from 'them' (origin is not verified) before proceeding as @p@. In order to
297297-- avoid waiting forever, @delay them p@ monitors 'them'. If it receives a
298−-- monitor message instead it simply terminates.
298+-- monitor message instead, it proceeds as @p@ too.
299299delay :: ProcessId -> Process () -> Process ()
300300delay them p = do
301301 ref <- monitor them
302302 let sameRef (ProcessMonitorNotification ref' _ _) = ref == ref'
303303 receiveWait [
304− match $ \() -> unmonitor ref >> p
304+ match $ \() -> unmonitor ref
305305 , matchIf sameRef $ \_ -> return ()
306306 ]
307+ p
307308
308309-- | 'CP' version of 'delay'
309310cpDelay :: ProcessId -> Closure (Process ()) -> Closure (Process ())