Meyer, OO and concurrency
David Hopwood
david.nospam.hopwood@REDACTED
Sun Jul 17 23:31:20 CEST 2005
Ulf Wiger wrote:
> Den 2005-07-17 01:26:25 skrev David Hopwood
> <david.nospam.hopwood@REDACTED>:
>
>> Various actor languages did have selective receive, for example the
>> "communication handlers" of Act2 and Act3. In any case, selective
>> receive does not affect the expressive power of a message passing
>> model: it can be simulated, albeit inefficiently, by receiving
>> unconditionally and then re-sending the message to self if necessary.
>
> Actually, you can't do it like that. That could for example
> cause your process to go into a tight loop
The loop doesn't have to be tight.
> consuming and re-sending the same unwanted message while waiting for
> some other message, which would have a rather nasty effect on
> cpu load and timing characteristics.
Right, but that's an efficiency issue, not an expressiveness one, and
therefore it couldn't be a fundamental difference between models (i.e.
it could not be the case that the actor model forbids selective receive).
--
David Hopwood <david.nospam.hopwood@REDACTED>
More information about the erlang-questions
mailing list