git.iko.soy/distributed-process
on master help sign in
Named send is intra-node, so we can use the optimised routing / encoding
9f10533Tim Watson
src/Control/Distributed/Process/Internal/Primitives.hs+1−1
@@ -924,7 +924,7 @@ whereisRemoteAsync nid label =
924-- | Named send to a process in the local registry (asynchronous)
924-- | Named send to a process in the local registry (asynchronous)
925nsend :: Serializable a => String -> a -> Process ()
925nsend :: Serializable a => String -> a -> Process ()
926nsend label msg =
926nsend label msg =
927− sendCtrlMsg Nothing (NamedSend label (createMessage msg))
927+ sendCtrlMsg Nothing (NamedSend label (createUnencodedMessage msg))
928
928
929-- | Named send to a process in a remote registry (asynchronous)
929-- | Named send to a process in a remote registry (asynchronous)
930nsendRemote :: Serializable a => NodeId -> String -> a -> Process ()
930nsendRemote :: Serializable a => NodeId -> String -> a -> Process ()
src/Control/Distributed/Process/Node.hs+1−6
@@ -812,12 +812,7 @@ ncEffectNamedSend from label msg = do
812 node <- ask
812 node <- ask
813 mPid <- gets (^. registeredHereFor label)
813 mPid <- gets (^. registeredHereFor label)
814 -- If mPid is Nothing, we just ignore the named send (as per Table 14)
814 -- If mPid is Nothing, we just ignore the named send (as per Table 14)
815− forM_ mPid $ \pid ->
815+ forM_ mPid $ \pid -> postMessage pid msg
816− liftIO $ sendPayload node
817− from
818− (ProcessIdentifier pid)
819− NoImplicitReconnect
820− (messageToPayload msg)
821
816
822-- [Issue #DP-20]
817-- [Issue #DP-20]
823ncEffectLocalSend :: ProcessId -> Message -> NC ()
818ncEffectLocalSend :: ProcessId -> Message -> NC ()