2015-02-10 67 views

回答

5

消息被丢弃。每the documentation

如果接收器已经终止,信号不会到达...

另见this answer from rvirding,谁可能知道他在谈论:

当发送消息到指向死亡过程的pid是完全合法的(消息只是消失)...

3

如果消息发送给PID,那么消息将消失在空白处。你甚至可以发送给不存在的PID ...

1> list_to_pid("<0.0.1>"). 
<0.0.1> 
2> v(1) ! foo. 
foo 

如果消息被发送到原子时,原子必须是注册名称的PID而在发送的那一刻,或发送会死机...

3> spawn(fun() -> register(name, self()), then_exit end). 
<0.36.0> 
4> name ! foo. 
** exception error: bad argument 
    in operator !/2 
     called as name ! foo