Simple lock up with delay + semaphore - not fixed with 0006576

Alexander Lazarević Alexander at Lazarevic.de
Sat Jan 5 12:47:42 UTC 2008


Andreas Raab schrieb:
> Georg Köster wrote:
>> This shows the use case. Shorter even:
>> |s|
>> s := Semaphore new.
>> Delay timeoutSemaphore: s afterMSecs: 1.
>> s wait.
>> Transcript show: 'doesnt get here - not printed'; cr.
>>
>> I hope I'm doing something wrong here!
>
> You must be. This works fine in a Croquet SDK image.
Unfortunately it seems that a ChangeSet of mine addressing [1]
introduced this bug. I guess it got included in 3.9 without anyone else
looking at it. As I mention in [2] the Delay class side method should read:

timeoutSemaphore: aSemaphore afterMSecs: anInteger
   "...comment..."

    ^ (self new setDelay: anInteger forSemaphore: aSemaphore) schedule

I guess trying to refactor too much made me change the method. I'm sorry
that I did not double check it more carefully in the first place.

Alex

[1] http://bugs.squeak.org/view.php?id=854
[2] http://bugs.squeak.org/view.php?id=6834



More information about the Squeak-dev mailing list