Simple lock up with delay + semaphore - not fixed with 0006576
Andreas Raab
andreas.raab at gmx.de
Sat Jan 5 08:43:20 UTC 2008
Tom Phoenix wrote:
> Is that the source in your image for that method? Here's what I have:
>
> waitTimeoutMSecs: anInteger
> "Wait on this semaphore for up to the given number of milliseconds,
> then timeout. It is up to the sender to determine the difference
> between the expected event and a timeout."
>
> | waitingProcess wakeupProcess |
> waitingProcess _ Processor activeProcess.
> wakeupProcess _
> [(Delay forMilliseconds: (anInteger max: 0)) wait.
> self resumeProcess: waitingProcess] fork.
>
> self wait.
> wakeupProcess terminate.
How odd. It seems that this version is only present in 3.9 - all other
images have a variant of the (much simpler) code:
waitTimeoutMSecs: anInteger
"Wait on this semaphore for up to the given number of milliseconds,
then timeout. It is up to the sender to determine the difference between
the expected event and a timeout."
| d |
d := Delay timeoutSemaphore: self afterMSecs: (anInteger max: 0).
[self wait] ensure:[d unschedule].
The 3.9 version is tagged "jf 12/2/2003" but there is no indication what
it is trying to address (if anything).
Cheers,
- Andreas
More information about the Squeak-dev
mailing list
|