本文介绍了Erlang消息不存在PID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Erlang运行时对发送到不存在进程的消息做什么?例如,一个进程被产生,然后在它终止另一个进程后再发送一个消息。
What does the Erlang runtime do with a message sent to a non-existent process? For example, a process is spawned, and then later after it terminates another process sends a message to it.
推荐答案消息是下降。根据文档:
如果接收方已经终止,信号将不会到达...
If the receiver has terminated, the signal will not arrive...
另请参阅 rvirding的这个答案,谁可能知道他在说什么:
Also see this answer from rvirding, who probably knows what he's talking about:
向pid发送一条消息,指的是一个死的进程是完全合法的(消息刚刚消失)...
While sending a message to a pid which refers to a dead process is perfectly legal (the message just disappears)...
更多推荐
Erlang消息不存在PID
发布评论