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.
2 parents 07dbb9b + f47c085 commit 6efcbc0Copy full SHA for 6efcbc0
src/Control/Distributed/Process/Internal/Primitives.hs
@@ -986,7 +986,10 @@ expectTimeout n = receiveTimeout n [match return]
986
spawnAsync :: NodeId -> Closure (Process ()) -> Process SpawnRef
987
spawnAsync nid proc = do
988
spawnRef <- getSpawnRef
989
- sendCtrlMsg (Just nid) $ Spawn proc spawnRef
+ node <- getSelfNode
990
+ if nid == node
991
+ then sendCtrlMsg Nothing $ Spawn proc spawnRef
992
+ else sendCtrlMsg (Just nid) $ Spawn proc spawnRef
993
return spawnRef
994
995
-- | Monitor a node (asynchronous)
0 commit comments