[erlang-patches] Selectively receive system messages in gen_server and gen_fsm
Jesper Louis Andersen
Mon Jan 7 19:03:07 CET 2013
On Mon, Jan 7, 2013 at 6:02 PM, Pedram Nimreezi <>wrote:
> - When you say catch all, does that mean the first pattern matches are
> irrelevant for selective receive if the last match is a catch all,
> does this implicitly invalidate the selective receive optimization?
Suppose you have patterns P1 and P2 and Messages M1 and M2 in that order in
the mailbox and receive clause. Let PmM mean match pattern P against
message M. Now two orders are possible:
Erlang uses A as the match style, so if P1 or P2 is a catch all, M1 will
always be picked before M2. Had Elrang used match style B then the order
would matter, but it doesn't.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-patches