We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent deadc44 commit c67b972Copy full SHA for c67b972
src/Control/Distributed/Process/Internal/Primitives.hs
@@ -1173,8 +1173,10 @@ unsafeNSend = Unsafe.nsend
1173
1174
-- | Named send to a process in a remote registry (asynchronous)
1175
nsendRemote :: Serializable a => NodeId -> String -> a -> Process ()
1176
-nsendRemote nid label msg =
1177
- sendCtrlMsg (Just nid) (NamedSend label (createMessage msg))
+nsendRemote nid label msg = do
+ here <- getSelfNode
1178
+ if here == nid then nsend label msg
1179
+ else sendCtrlMsg (Just nid) (NamedSend label (createMessage msg))
1180
1181
--------------------------------------------------------------------------------
1182
-- Closures --
0 commit comments