git.iko.soy/distributed-process
on master help sign in
Throw NodeClosedException when the node controller is stopped.

Formerly the NC could end with either NodeClosedException or with ThreadKilled. ThreadKilled was a bit confusing because there is no call to threadKill to send it and there was no good reason to prefer it over NodeClosedException.

commite2bfbeb5f87ee958ec6d18801963e6d899e6016c authorFacundo Domínguez <facundo.dominguez@tweag.io> dateWed 6 Jan 2016, 11:27 (11 years ago) parent4c0c890
1 file changed+1−2
src/Control/Distributed/Process/Node.hs+1−2
src/Control/Distributed/Process/Node.hs+1−2
@@ -765,8 +765,7 @@ nodeController = do
765765 NCMsg _ SigShutdown ->
766766 liftIO $ do
767767 NT.closeEndPoint (localEndPoint node)
768− `Exception.finally` throwIO ThreadKilled
769− -- ThreadKilled seems to make more sense than fail/error here
768+ `Exception.finally` throwIO (NodeClosedException $ localNodeId node)
770769 NCMsg (ProcessIdentifier from) (GetNodeStats nid) ->
771770 ncEffectGetNodeStats from nid
772771 unexpected ->