How to give different priorities to erlang messages
问题 In the book "erlang programming" and in this stack overflow question I have seen that we can give different priorities to erlang messages in the mailbox using: I tried to implement something similar with this code: -module(mytest). -export([start/0, test/0]). start() -> register(?MODULE, spawn(fun() -> do_receive() end)). do_receive() -> receive {high_p, Message} -> io:format("High priority: ~p~n", [Message]), do_receive() after 0 -> receive {low_p, Message} -> io:format("Low priority: ~p~n",