Erlang消息不存在PID [英] Erlang message to non-existent PID

查看:180
本文介绍了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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆