摘要 |
A method is provided to virtualize a mutually exclusive lock of a shared immutable object. A determination is made whether any threads have locked the immutable shared object. If threads have not locked the immutable shared object, threads of different tasks are allowed to fast lock and unlock the immutable shared object. If a thread requests the lock of an immutable shared object and the object is fast locked by another thread when both threads are from an equivalent task, the lock of the immutable shared object is inflated and the requesting thread is blocked. If a thread requests the lock of an immutable shared object and the object is fast locked by another thread when both threads are from different tasks, the lock of the immutable shared object is virtualized and granted to the requesting thread. |