distributed-process 0.5.3 → 0.5.4
raw patch · 3 files changed
+16/−8 lines, 3 filesnew-uploaderPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- distributed-process.cabal +1/−1
- src/Control/Distributed/Process/Internal/Primitives.hs +1/−1
- src/Control/Distributed/Process/Node.hs +14/−6
distributed-process.cabal view
@@ -1,5 +1,5 @@ Name: distributed-process-Version: 0.5.3+Version: 0.5.4 Cabal-Version: >=1.8 Build-Type: Simple License: BSD3
src/Control/Distributed/Process/Internal/Primitives.hs view
@@ -1111,7 +1111,7 @@ -- | Named send to a process in the local registry (asynchronous) nsend :: Serializable a => String -> a -> Process () nsend label msg =- sendCtrlMsg Nothing (NamedSend label (createUnencodedMessage msg))+ sendCtrlMsg Nothing (NamedSend label (createMessage msg)) -- | Named send to a process in the local registry (asynchronous). -- This function makes /no/ attempt to serialize and (in the case when the
src/Control/Distributed/Process/Node.hs view
@@ -156,10 +156,11 @@ , RegisterReply(..) , WhereIsReply(..) , payloadToMessage+ , messageToPayload , createUnencodedMessage , runLocalProcess , firstNonReservedProcessId- , ImplicitReconnect(WithImplicitReconnect)+ , ImplicitReconnect(WithImplicitReconnect,NoImplicitReconnect) ) import Control.Distributed.Process.Management.Internal.Agent ( mxAgentController@@ -187,6 +188,7 @@ import Control.Distributed.Process.Internal.Messaging ( sendBinary , sendMessage+ , sendPayload , closeImplicitReconnections , impliesDeathOf )@@ -686,8 +688,8 @@ ncEffectRegister from label atnode pid force NCMsg (ProcessIdentifier from) (WhereIs label) -> ncEffectWhereIs from label- NCMsg _ (NamedSend label msg') ->- ncEffectNamedSend label msg'+ NCMsg (ProcessIdentifier from) (NamedSend label msg') ->+ ncEffectNamedSend from label msg' NCMsg _ (LocalSend to msg') -> ncEffectLocalSend node to msg' NCMsg _ (LocalPortSend to msg') ->@@ -904,11 +906,17 @@ (WhereIsReply label mPid) -- [Unified: Table 14]-ncEffectNamedSend :: String -> Message -> NC ()-ncEffectNamedSend label msg = do+ncEffectNamedSend :: ProcessId -> String -> Message -> NC ()+ncEffectNamedSend from label msg = do mPid <- gets (^. registeredHereFor label)+ node <- ask -- If mPid is Nothing, we just ignore the named send (as per Table 14)- forM_ mPid $ \pid -> postMessage pid msg+ forM_ mPid $ \pid ->+ liftIO $ sendPayload node+ (ProcessIdentifier from)+ (ProcessIdentifier pid)+ NoImplicitReconnect+ (messageToPayload msg) -- [Issue #DP-20] ncEffectLocalSend :: LocalNode -> ProcessId -> Message -> NC ()