Patent ID: 7886300

Claim:
A machine implemented method, comprising: initializing a first thread, wherein initializing the first thread comprises allocating a first mutex and causing the first thread to obtain a lock on the first mutex, and allocating a first memory portion which is associated with the first thread as a first boost record; initializing a second thread, wherein initializing the second thread comprises allocating a second mutex and causing the second thread to obtain a lock on the second mutex, and allocating a second memory portion which is associated with the second thread as a second boost record; granting the first thread a lock on a target object; detecting that the second thread wishes to lock the target object while the first thread owns the lock on the target object; creating a heavy-weight lock (HL) data structure, which is associated with the target object; disassociating the second boost record from the second thread and associating the second boost record with the HL data structure; updating a boost queue in the second boost record to include the second thread; and causing the second thread to wait on the first mutex and a cancel object, wherein the second thread is awakened if either the lock on the first mutex is released or the cancel object is signaled.