@@ -490,19 +490,15 @@ whereis label = do
490 (\(WhereIsReply _ mPid) -> return mPid)
490 (\(WhereIsReply _ mPid) -> return mPid)
493−-- | Query a remote process registry (synchronous)
495−-- TODO: what if the remote node is unreachable?
496−whereisRemote :: NodeId -> String -> Process (Maybe ProcessId)
497−whereisRemote nid label = do
498− whereisRemoteAsync nid label
499− receiveWait [ matchIf (\(WhereIsReply label' _) -> label == label')
500− (\(WhereIsReply _ mPid) -> return mPid)
503-- | Query a remote process registry (asynchronous)
493-- | Query a remote process registry (asynchronous)
505−-- Reply will come in the form of a 'WhereIsReply' message
495+-- Reply will come in the form of a 'WhereIsReply' message.
497+-- There is currently no synchronous version of 'whereisRemoteAsync': if
498+-- you implement one yourself, be sure to take into account that the remote
499+-- node might die or get disconnect before it can respond (i.e. you should
500+-- use 'monitorNode' and take appropriate action when you receive a
501+-- 'NodeMonitorNotification').
506whereisRemoteAsync :: NodeId -> String -> Process ()
502whereisRemoteAsync :: NodeId -> String -> Process ()
507whereisRemoteAsync nid label =
503whereisRemoteAsync nid label =
508 sendCtrlMsg (Just nid) (WhereIs label)
504 sendCtrlMsg (Just nid) (WhereIs label)