[erlang-questions] non-FIFO behavior in process mailboxes?
David Mercer
dmercer@REDACTED
Fri Apr 27 21:26:38 CEST 2012
On Apr 22, 2012, at 20:38, Michael Turner <michael.eugene.turner@REDACTED> wrote:
> This bug came out of experimentation inspired by the recent discussion
> of initializing objects *after* their creation, a topic raised by
> Richard O'Keefe. And -- waddya know -- the problem here relates
> directly to his objection to this practice: inconsistent intermediate
> states. It appears that when you model your objects as processes, the
> danger is particularly acute.
If you had modeled the the set_arg_to and set_val_to as synchronous calls, like your function val_for – and like gen_server's call rather than cast – you can still do this. Though I still agree with ROK.
Cheers,
DBM
More information about the erlang-questions
mailing list