git.iko.soy/distributed-process
on master help sign in
cosmetic/doc
commitaf229cf44ee17de99490c7a0cab62816c785b01e authorTim Watson <tim@rabbitmq.com> dateThu 28 Mar 2013, 17:03 (14 years ago) parentb3fa53c
2 files changed+3−1
src/Control/Distributed/Process/Internal/Primitives.hs+2−1 src/Control/Distributed/Process/Node.hs+1
src/Control/Distributed/Process/Internal/Primitives.hs+2−1
@@ -520,7 +520,8 @@ relay pid = receiveWait [ matchAny (\m -> forward m pid) ] >> relay pid
520520
521521-- | Proxies @pid@ and forwards messages whenever @proc@ evaluates to @True@.
522522-- Unlike 'delegate' the predicate @proc@ runs in the 'Process' monad, allowing
523−-- for richer proxy behaviour.
523+-- for richer proxy behaviour. If @proc@ returns @False@ or the /runtime type check/
524+-- fails, no action is taken and the proxy process will continue running.
524525proxy :: Serializable a => ProcessId -> (a -> Process Bool) -> Process ()
525526proxy pid proc = do
526527 receiveWait [
src/Control/Distributed/Process/Node.hs+1
@@ -268,6 +268,7 @@ startServiceProcesses node = do
268268 -- tracing /spawns/ relies on the tracer being enabled, but we start
269269 -- the default tracer first, even though it might @nsend@ to the logger
270270 -- before /that/ process has started - this is a totally harmless race
271+ -- however, so we deliberably ignore it
271272 mPid <- startDefaultTracer node
272273 case mPid of
273274 Nothing -> return ()