[erlang-questions] Order of monitor signal(s)

Sverker Eriksson sverker.eriksson@REDACTED
Thu Nov 30 16:28:59 CET 2017


On tor, 2017-11-30 at 16:05 +0100, Dmytro Lytovchenko wrote:
> message delivery is instant the moment you execute send command (send
> opcode).

NO NO NO.
Messages are asynchronous signals. The return of the "send command"
does not guarantee ANYTHING.


> So exit message well always arrive second, because ordering guarantee
> - exit message was sent SECOND.
>
YES
Erlang signals (messages, links, monitors, etc) guarantee ordered
delivery between process pairs. THAT is what gives you the guarantee
that all messages sent from process A are put in the message queue of
process B before the monitor 'DOWN' message.

/Sverker


> On 30 Nov 2017 4:02 pm, "Dmitry Kolesnikov" <dmkolesnikov@REDACTED>
> wrote:
> Hello,
> 
> There is a statement that Erlang messages may be not delivered, but
> message order is always preserved relative to two processes. This is
> a statement regarding the ordinal message… Is this statement valid
> when we are talking about monitor messages in relation to ordinal
> message? I have strong feeling that it is not guaranteed.
> 
> So, let’s assume we have a process A that sends async message to
> process B and quits. The process B listens messages for process A and
> monitors it with erlang:monitor(process, A). I am suspecting that
> there are no guarantee that message will be delivered before exit
> signal. Am I right?
> 
> Thank you in advanced!
> 
> Best Regards,
> Dmitry
> 
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
> 
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions


More information about the erlang-questions mailing list