News for hackers. Stuff that matters.
Re:Go 1.18 by ergl on Wednesday March 16, 2022 @10:32AM (#30699304)
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.

There are no comments on this comment yet.