git.iko.soy/distributed-process
on master help sign in
More cleanup
commita0c7adc01b1f039c44dd1f8f1de9fb5434bd212f authorEdsko de Vries <edsko@edsko.net> dateFri 29 Jun 2012, 10:18 (14 years ago) parent8b5722c
2 files changed+12−5
distributed-process/src/Control/Distributed/Process/Internal/Process/Primitives.hs−2 distributed-process/src/Control/Distributed/Process/Node.hs+12−3
distributed-process/src/Control/Distributed/Process/Internal/Process/Primitives.hs−2
@@ -99,8 +99,6 @@ import Control.Distributed.Process.Internal.Node (runLocalProcess)
9999send :: Serializable a => ProcessId -> a -> Process ()
100100-- This requires a lookup on every send. If we want to avoid that we need to
101101-- modify serializable to allow for stateful (IO) deserialization
102−-- Warning: if we change how 'send' is implemented, might also want to change
103−-- the implementation of 'Internal.Closure.TH.generateSender'
104102send them msg = procMsg $ sendMessage (ProcessIdentifier them) msg
105103
106104-- | Wait for a message of a specific type
distributed-process/src/Control/Distributed/Process/Node.hs+12−3
@@ -282,12 +282,21 @@ handleIncomingMessages node = go [] Map.empty Map.empty Set.empty
282282 { ctrlMsgSender = nid
283283 , ctrlMsgSignal = Died nid DiedDisconnect
284284 }
285− NT.ErrorEvent _ ->
286− fail "handleIncomingMessages: TODO 3"
285+ NT.ErrorEvent (NT.TransportError (NT.EventConnectionLost Nothing _) _) ->
286+ -- We cannot really deal with the case that some (but not all)
287+ -- incoming connections from a remote node have failed (what if this
288+ -- incoming connection corresponds to a typed channel, for instance?)
289+ fail "handleIncomingMessages: TODO"
290+ NT.ErrorEvent (NT.TransportError NT.EventEndPointFailed str) ->
291+ fail $ "Cloud Haskell fatal error: end point failed: " ++ str
292+ NT.ErrorEvent (NT.TransportError NT.EventTransportFailed str) ->
293+ fail $ "Cloud Haskell fatal error: transport failed: " ++ str
287294 NT.EndPointClosed ->
288295 return ()
289296 NT.ReceivedMulticast _ _ ->
290− fail "handleIncomingMessages: TODO 4"
297+ -- If we received a multicast message, something went horribly wrong
298+ -- and we just give up
299+ fail "Cloud Haskell fatal error: received unexpected multicast"
291300
292301 state = localState node
293302 endpoint = localEndPoint node