git.iko.soy/distributed-process
on master help sign in
cosmetic/doc
af229cfTim Watson
src/Control/Distributed/Process/Internal/Primitives.hs+2−1
@@ -520,7 +520,8 @@ relay pid = receiveWait [ matchAny (\m -> forward m pid) ] >> relay pid
520
520
521-- | Proxies @pid@ and forwards messages whenever @proc@ evaluates to @True@.
521-- | Proxies @pid@ and forwards messages whenever @proc@ evaluates to @True@.
522-- Unlike 'delegate' the predicate @proc@ runs in the 'Process' monad, allowing
522-- 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.
524proxy :: Serializable a => ProcessId -> (a -> Process Bool) -> Process ()
525proxy :: Serializable a => ProcessId -> (a -> Process Bool) -> Process ()
525proxy pid proc = do
526proxy pid proc = do
526 receiveWait [
527 receiveWait [
src/Control/Distributed/Process/Node.hs+1
@@ -268,6 +268,7 @@ startServiceProcesses node = do
268 -- tracing /spawns/ relies on the tracer being enabled, but we start
268 -- tracing /spawns/ relies on the tracer being enabled, but we start
269 -- the default tracer first, even though it might @nsend@ to the logger
269 -- the default tracer first, even though it might @nsend@ to the logger
270 -- before /that/ process has started - this is a totally harmless race
270 -- before /that/ process has started - this is a totally harmless race
271+ -- however, so we deliberably ignore it
271 mPid <- startDefaultTracer node
272 mPid <- startDefaultTracer node
272 case mPid of
273 case mPid of
273 Nothing -> return ()
274 Nothing -> return ()