Meyer, OO and concurrency

John-Olof Bauner <>
Mon Jul 18 10:03:25 CEST 2005

David Hopwood wrote:

> Ulf Wiger wrote:
>> Den 2005-07-17 01:26:25 skrev David Hopwood  
>> <>:
>>> 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.
For an actor in ObjectTime you can use defer for signals that comes in 
when you don't want them. You should not forget to put these signals 
back to the queue though. But as Ulf argues the paradigm is poor as 
compared to selective receive.

>> 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).
There is an underlying system, RTS/OS, and if it allows selective 
receive and the model allows it then there should not be any problem.


More information about the erlang-questions mailing list