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

Dmytro Lytovchenko dmytro.lytovchenko@REDACTED
Thu Nov 30 19:35:29 CET 2017


On 30 Nov 2017 4:29 pm, "Sverker Eriksson" <sverker.eriksson@REDACTED>
wrote:

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.


unless send is a trappable bif, it delivers to mail box immediately, this
is what i meant to say. of course it will be delivered to the Erlang code
when the process wakes up and gets his cpu time. terminology is not easy.



> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20171130/5b5af6d7/attachment.htm>


More information about the erlang-questions mailing list