Simple lock up with delay + semaphore - not fixed with 0006576
Andreas Raab
andreas.raab at gmx.de
Sat Jan 5 08:19:50 UTC 2008
Georg Köster wrote:
> I'm trying around with Croquet since a short while and stumbled over a
> bug in TPromise, but after a first fix there I also found that I could
> lock up my squeak (3.8.18beta1U on os x 10.5) as simply as this:
>
> |s b c|
> s := Semaphore new.
> b := false.
> [b := true. "forgotten/crashed therefore no: s signal." ] fork.
> Delay timeoutSemaphore: s afterMSecs: 1.
> s wait.
> c := b.
> Transcript show: c; cr.
I am not sure what you expect this to print. In a Croquet SDK image it
prints "true" which I presume is correct?
> 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.
> I pasted the fixes from 6576 and 6588 to no avail.
None of these would even affect this behavior.
> Resource intense, I know. I would love to use your Delay mechanism!
And you should be able to. All of the above seem to work fine with the
Croquet images that I've tried - what images are you using it with?
Cheers,
- Andreas
More information about the Squeak-dev
mailing list
|