4 ms·
Erlang has selective receive, meaning it will go through all your receive branches in order, until one matches. With this code: receive {high_p, M
by ergl 5y ago
Erlang has selective receive, meaning it will go through all your receive branches in order, until one matches.
With this code:
receive
{high_p, Message} ->
process_high(Message);
{low_p, Message} ->
process_low(Message)
end
if the process has one high_p message and a low_p message, the high_p message will be processed first.