[BUG][FIX] SharedQueue flushing (a plea for consideration)

Doug Way dway at riskmetrics.com
Wed Jun 11 23:07:59 UTC 2003


Just a reminder that we should try to add the extra comments in 
parentheses in the subject when replying so that things show up in the 
bugfixes archive.  In this case, this is mostly "(a plea for 
consideration)".  A subject-comment like that showing up in the archive 
will attract more attention than no comment at all.

Also, I won't generally be able to respond to direct requests to include 
something, unless it's some sort of emergency.  It is reasonable to 
re-post about a very old fix in order to bring attention to it, if it's 
important enough to you, though.  So I'm doing that for Nathanael here. :-)

- Doug Way


Stephane Ducasse wrote:

>
> Begin forwarded message:
>
>> From: Nathanael Schärli <n.schaerli at gmx.net>
>> Date: Wed Jun 11, 2003  10:04:50 AM Europe/Zurich
>> To: "'Doug Way'" <dway at riskmetrics.com>
>> Cc: "'Stephane Ducasse'" <ducasse at iam.unibe.ch>
>> Subject: FW: [BUG][FIX] SharedQueue flushing
>>
>> Hi Doug
>>
>> I have posted this bugfix just about a year ago, but for some reason it
>> didn't make it into the image yet. Since it concerns a very central
>> class of the system, I think that it would be good of you could included
>> it into the updates.
>>
>> Thanks,
>> Nathanael
>>
>>> -----Original Message-----
>>> From: squeak-dev-admin at lists.squeakfoundation.org
>>> [mailto:squeak-dev-admin at lists.squeakfoundation.org] On
>>> Behalf Of Nathanael Schärli
>>> Sent: Dienstag, 18. Juni 2002 11:18
>>> To: squeak-dev at lists.squeakfoundation.org
>>> Subject: [BUG][FIX] SharedQueue flushing
>>>
>>>
>>> Hey
>>>
>>> I have noticed that there are bugs in the methods
>>> SharedQueue>>flush and
>>> SharedQueue>>flushAllSuchThat:. The problem is that both of
>>> them do not
>>> properly adjust the semaphore "readSynch" which is used to
>>> block readers if the queue is empty. Look at the following examples:
>>>
>>> q _ SharedQueue new.
>>> q nextPut: 100.
>>> q flush.
>>> q next.
>>>
>>> This example should block the active process because there is
>>> currently no element in the queue. Instead, you get an error
>>> message ("Error in SharedQueue synchronization").
>>>
>>> q _ SharedQueue new.
>>> q nextPut: 100.
>>> q nextPut: 200.
>>> q flushAllSuchThat: [:each | each > 150].
>>> q next.
>>> q next.
>>>
>>> Also this example should block the active process because
>>> there is currently no element in the queue. Instead, you get
>>> the same error message ("Error in SharedQueue synchronization").
>>>
>>>
>>> I have attached a little changeset that fixes this problem.
>>>
>>> Cheers,
>>> Nathanael
>>>
>
>------------------------------------------------------------------------
>
>
>  
>




More information about the Squeak-dev mailing list