Acquire the Lock.
Execute comp protected by the lock.
Execute comp protected by the lock.
Get a new Condition object associated with this.
Get a new Condition object associated with this.
Make one attempt to acquire the lock
Make one attempt to acquire the lock; if successful, execute comp and then release the lock; if unsuccessful execute elseComp.
Make one attempt to acquire the lock; if successful, execute comp and then release the lock; if unsuccessful execute elseComp.
Release the Lock.
A queue lock, suitable for an arbitrary number of threads.
Based on Herlihy & Shavit, Section 7.5.2.