Higher order receieve anybody
Wed Feb 25 04:41:44 CET 2004
"Richard A. O'Keefe" <ok@REDACTED> wrote:
> Colour me stupid, but why not have two processes?
> One to do the real work, and one to handle the administrative
> messages and forward stuff to the worker?
> What am I missing here?
The messages are stuff like:
"Yo! You need to stop working now so we can safely upgrade a
whole wad of code. Go to sleep for a few seconds!"
"Yo! Your code has changed! Somehow make an external call back
into yourself to get the new version."
"Yo! Your code has changed! You might want to migrate your old
state data to its new internal format, if the new code says you
"Hey stupid! Your parent is dead. You should stop processing
now because your parent was a supervisor, and you claimed you
were a good OTP citizen when you signed up with it."
All stuff the work must do himself...
The suspend (sleep, the first one) is necessary to be selective, not all
states may allow suspending the process. gen_server, gen_fsm, gen_event
all allow suspend any time, which isn't ideal.
"First, we would not accept a treaty that would not have been ratified, nor a
treaty that I thought made sense for the country."
George W. Bush
April 24, 2001
Referring to the Kyoto Accord. From an interview published in the Washington
More information about the erlang-questions