SharedQueue>>peek behavior?

Ned Konz ned at bike-nomad.com
Mon Jul 14 14:17:53 UTC 2003


On Sunday 13 July 2003 11:27 am, Ned Konz wrote:
> Hi folks,
>
> I've just written a set of SharedQueue tests (as well as adding
> some more SharedQueue fixes and a SharedQueue based on Monitor),
> and noticed that the behavior of SharedQueue>>peek is not as
> documented. That is, if the queue is empty, the peeking process
> does not in fact block.
>
> However, the comment says:
>
> "Answer the object that was sent through the receiver first and has
> not yet been received by anyone but do not remove it from the
> receiver. If no object has been sent, suspend the requesting
> process until one is."
>
> My new queue does this.
>
> Which behavior do we want? GNU Smalltalk actually (says it) blocks.
> I don't remember what VW does.


And EventSensor as currently written depends on #peek not blocking...

-- 
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE



More information about the Squeak-dev mailing list