On 18 March 2011 10:12, Mark Evenson evenson@panix.com wrote:
- If no other threads are trying to claim the lock, then
condition-wait will return immediately rather than waiting.
I couldn't reproduce this behavior. In ABCL, the THREADS:OBJECT-WAIT
That obviously shouldn't happen. The wait should block until a notify arrives.
- If two threads are waiting in condition-wait and two other threads
Two threads can't be waiting in condition wait, the wait must be surrounded by the same lock, so two threads can't arrive to the condition wait simultaneously.
- If condition-notify is called by one thread when a waiting thread
is just about to enter the threads:synchronized-on form (but before it gets synchronized), then the notify will be lost. This happens
Sure, but condition variables require a lock-check-wait-check cycle. Lost nofitications shouldn't be a problem because the check will pass if the condition was already signalled.
Or are these conditions drastically different from how pthread conditions work?