git.iko.soy/distributed-process
on master help sign in
TODOs
commitc5d167ada4534c8497e746a2802a3c40ecfe587a authorEdsko de Vries <edsko@edsko.net> dateFri 8 Jun 2012, 18:23 (14 years ago) parent4901585
1 file changed+16−8
distributed-process/src/Control/Distributed/Process.hs+16−8
distributed-process/src/Control/Distributed/Process.hs+16−8
@@ -49,6 +49,20 @@
4949-- http://www.erlang.org/faq/academic.html
5050-- [4] "Delivery of Messages", post on erlang-questions
5151-- http://erlang.org/pipermail/erlang-questions/2012-February/064767.html
52+--
53+-- TODOs:
54+--
55+-- 1. Central MonitorAction mapping, so that we can efficiently execute monitor
56+-- actions from Network.Transport.receive-ing thread.
57+-- 2. Access this mapping from send too, because we cannot rely on
58+-- EventConnectionLost (although it so happens that with the TCP transport
59+-- we can).
60+-- 3. Modify EvenConnectionLost to have Maybe EndPointAddress
61+-- 4. Change in API? (you can register multiple monitors, they get MonitorIds.
62+-- to unregister, to provide the monitor ID -- if we do, unregistering the
63+-- same ID multiple times is idempotent)
64+-- 5. You get precisely one notification per monitor
65+-- 6. When a connection is already broken, monitor notifies immediately
5266module Control.Distributed.Process
5367 ( -- * Basic cloud Haskell API
5468 ProcessId
@@ -490,14 +504,8 @@ sendBinary them conn payload = do
490504 result <- liftIO $ NT.send conn payload
491505 case result of
492506 Right () -> return ()
493− Left _ ->
494− {-
495− -- TODO: put into unreachable state rather than Nothing
496− -- ourState <- processState <$> ask
497− liftIO $ modifyMVar_ ourState $
498− return . (connectionTo them ^= Nothing)
499− -}
500− remoteProcessFailed them
507+ Left _ -> remoteProcessFailed them
508+
501509
502510sendMessage :: ProcessId -> NT.Connection -> Message -> Process ()
503511sendMessage them conn (Message fp enc) =