Erlang消息不存在PID

编程入门 行业动态 更新时间:2024-10-27 05:22:07
本文介绍了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

本文发布于:2023-10-22 23:56:20,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1519113.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:不存在   消息   Erlang   PID

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!