BEAM implementation questions

Raimo Niskanen raimo@REDACTED
Tue Jan 25 08:28:01 CET 2005

Well, it is only the receiver that knows what it wants, and it executes
.beam code to match the received messages, so - yes, the receiver
gets scheduled, tries to match from the inqueue, fails and schedules
out. The good thing is that it is remembered which message is the
next to match (since the receive clauses will not change during
the recive no old messages will ever match) so it is only new
messages that are tried next time.

james.hague@REDACTED (James Hague) writes:

> 2. Let's say I have the following code:
> receive ready -> do_something() end
> Now suppose I send 100 messages to that process and the last one is
> the atom "ready".  Is there some kind of high-level checking when a
> message is sent to that process, to see that the process is
> specifically waiting for a message of a certain format?  Or does the
> process simply get executed periodically, scans the mailbox for
> "ready," finds that there is none and exits?  (I'm hoping that makes
> sense!)
> James


/ Raimo Niskanen, Erlang/OTP, Ericsson AB

More information about the erlang-questions mailing list