3 ms·
As far as I understand, the receive[1] call performs pattern matching on messages in the queue. If no match is found, the call blocks until any of the patterns
by roeles 3y ago
As far as I understand, the receive[1] call performs pattern matching on messages in the queue. If no match is found, the call blocks until any of the patterns match. If a match is found, the first match is returned.
Since you perform this pattern matching, this means that messages may not be processed in the order they were received.
[1] https://www.erlang.org/blog/message-passing/ https://www.erlang.org/blog/message-passing/