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

Georg Köster georg.koester at gmail.com
Fri Jan 4 22:58:40 UTC 2008


Hi all,

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.

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!

I pasted the fixes from 6576 and 6588 to no avail.

I have this fix for my use-case: Avoid Delay>>timeoutSempaphore:afterMSecs:
|s|
s := Semaphore new.
[(Delay forSeconds:1) wait. s signal.] fork.
s wait.
Transcript show: 'Now gets here - line will be printed'; cr.

Resource intense, I know. I would love to use your Delay mechanism!
Cheers,
Georg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20080104/6f4c18b9/attachment.htm


More information about the Squeak-dev mailing list