Have nsend send unencoded messages to local processes.
On one hand, this is an optimization. It saves decoding the message
when the NC handles the message to a local destination. On the other
hand, it guarantees the message will be fully evaluated (up to endoding)
since encoded messages are not fully evaluated unless they go through
the transport.
commitb5285a1797b3b96e07a0c7f25f3f3a64207a4eae
authorFacundo Domínguez <facundo.dominguez@tweag.io>
dateWed 16 Mar 2016, 09:21 (11 years ago)
parent0a7488c
src/Control/Distributed/Process/Internal/Primitives.hs+1−1
@@ -1186,7 +1186,7 @@ whereisRemoteAsync nid label = do
11861186-- | Named send to a process in the local registry (asynchronous)
11871187nsend :: Serializable a => String -> a -> Process ()
11881188nsend label msg =
1189− sendCtrlMsg Nothing (NamedSend label (createMessage msg))
1189+ sendCtrlMsg Nothing (NamedSend label (createUnencodedMessage msg))
11901190
11911191-- | Named send to a process in the local registry (asynchronous).
11921192-- This function makes /no/ attempt to serialize and (in the case when the