git.iko.soy/distributed-process
on master help sign in
Merge branch 'master' of github.com:haskell-distributed/distributed-process
73991f0Edsko de Vries
distributed-process-simplelocalnet/src/Control/Distributed/Process/Backend/SimpleLocalnet.hs+11−4
@@ -305,14 +305,21 @@ terminateAllSlaves backend = do
305-- Master nodes
305-- Master nodes
306--------------------------------------------------------------------------------
306--------------------------------------------------------------------------------
307
307
308−-- | 'startMaster' finds all slaves currently available on the local network
308+-- | 'startMaster' finds all slaves /currently/ available on the local network,
309−-- (which should therefore be started first), redirects all log messages to
310−-- itself, and then calls the specified process, passing the list of slaves
309+-- redirects all log messages to itself, and then calls the specified process,
311−-- nodes.
310+-- passing the list of slaves nodes.
312--
311--
313-- Terminates when the specified process terminates. If you want to terminate
312-- Terminates when the specified process terminates. If you want to terminate
314-- the slaves when the master terminates, you should manually call
313-- the slaves when the master terminates, you should manually call
315-- 'terminateAllSlaves'.
314-- 'terminateAllSlaves'.
315+--
316+-- If you start more slave nodes after having started the master node, you can
317+-- discover them with later calls to 'findSlaves', but be aware that you will
318+-- need to call 'redirectLogHere' to redirect their logs to the master node.
319+--
320+-- Note that you can use functionality of "SimpleLocalnet" directly (through
321+-- 'Backend'), instead of using 'startMaster'/'startSlave', if the master/slave
322+-- distinction does not suit your application.
316startMaster :: Backend -> ([NodeId] -> Process ()) -> IO ()
323startMaster :: Backend -> ([NodeId] -> Process ()) -> IO ()
317startMaster backend proc = do
324startMaster backend proc = do
318 node <- newLocalNode backend
325 node <- newLocalNode backend
distributed-process/distributed-process.cabal+1−1
@@ -42,7 +42,7 @@ Library
42 mtl >= 2.0 && < 2.2,
42 mtl >= 2.0 && < 2.2,
43 data-accessor >= 0.2 && < 0.3,
43 data-accessor >= 0.2 && < 0.3,
44 bytestring >= 0.9 && < 0.11,
44 bytestring >= 0.9 && < 0.11,
45− containers >= 0.4 && < 0.6,
45+ containers >= 0.5 && < 0.6,
46 old-locale >= 1.0 && < 1.1,
46 old-locale >= 1.0 && < 1.1,
47 time >= 1.2 && < 1.5,
47 time >= 1.2 && < 1.5,
48 random >= 1.0 && < 1.1,
48 random >= 1.0 && < 1.1,