[BUG][FIX][TEST] SemaphoreWaitAndWaitTimeoutFix-jf

julian at beta4.com julian at beta4.com
Wed Dec 3 03:43:41 UTC 2003


from preamble:

"Change Set:		SemaphoreWaitAndWaitTimeoutFix-jf
Date:			2 December 2003
Author:			Julian Fitzell

When using #wait and #waitTimeoutMSecs: together there is what appears
to me to be a bug (both based on what the comment in #waitTimeoutMSecs:
says and what seems intuitive).

#waitTimeoutMSecs: uses a Delay to signal the semaphore.  So, if there
is already a process waiting on the semaphore, that process is resumed
rather than the one that specified the timeout.

I'm note sure if there's a better solution than the one here.  I
enclosed a test as a separate attachment so other can implement a better
one if they see fit.  The fix here creates an awful lot of short lived
processes - I don't see any obvious performance slow-down but I'm not
really sure how best to benchmark it.

(Tests included in a separate attachment)"!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SemaphoreWaitAndWaitTimeoutFix-jf.cs.gz
Type: application/octet-stream
Size: 922 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20031202/6e668481/SemaphoreWaitAndWaitTimeoutFix-jf.cs.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SemaphoreWaitAndWaitTimeoutFixTest-jf.1.cs.gz
Type: application/octet-stream
Size: 750 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20031202/6e668481/SemaphoreWaitAndWaitTimeoutFixTest-jf.1.cs.obj


More information about the Squeak-dev mailing list