<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi all,<div><br></div><div>We've had a semi-heated discussion in Russian community over this question: <a href="http://stackoverflow.com/questions/14556109/race-condition-between-trap-exit-exit-msg-and-common-msg">http://stackoverflow.com/questions/14556109/race-condition-between-trap-exit-exit-msg-and-common-msg</a></div><div><br></div><div>The question is as following: Assume we have processes A and B which are linked. Process's A flag trap_exit is set to true. Let B process send a msg to A and then exit:<br><br><div><font class="Apple-style-span" face="'Courier New'">PidA ! 'msg',</font></div><div><font class="Apple-style-span" face="'Courier New'">exit(reason).</font></div><br class="Apple-interchange-newline">What I wanna know if we can be shure that the process A will receive 'msg' and only after It {'EXIT', Pid, reason} will come ? Can we predict the ordering of msgs? I can't found any proofs in documentation, but I guess that it will work that way, but I need some proofs. Don't want to have race condition here.</div><div><br></div><div><br></div><div>Can anyone with the intimate knowledge of Erlang internals shed some light on this?</div><div><br></div><div>Thanks!</div></body></html>