On 18 March 2011 16:46, Mark Evenson evenson@panix.com wrote:
THREADS:SYNCHRONIZED-ON is now the first form executed by BT:CONDITION-WAIT so the window here is considerably narrowed.
The current implementation is about as bare as one can get: (defun condition-wait (condition lock) (threads:synchronized-on condition (release-lock lock) (threads:object-wait condition)) (acquire-lock lock)) I think all implementations of CONDITION-WAIT would have such a window as the environment gets setup to make the control transfer. Maybe one could turn the CONDITION-WAIT into a macro?
Where's the race window? condition-wait is always called with the lock held.