| Trees | Indices | Help |
|
|---|
|
|
Implements a shared lock.
Multiple threads can acquire the lock in a shared way, calling acquire_shared(). In order to acquire the lock in an exclusive way threads can call acquire_exclusive().
The lock prevents starvation but does not guarantee that threads will acquire the shared lock in the order they queued for it, just that they will eventually do so.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Is the current thread somehow owning the lock at this time? This is a private version of the function, which presumes you're holding the internal lock. |
Is the current thread somehow owning the lock at this time?
|
Wait on the given condition, and raise an exception if the current lock is declared deleted in the meantime.
|
Acquire the lock exclusively. This is a private function that presumes you are already holding the internal lock. It's defined separately to avoid code duplication between acquire() and delete() |
Acquire a shared lock.
|
Release a Shared Lock. You must have acquired the lock, either in shared or in exclusive mode, before calling this function. |
Delete a Shared Lock. This operation will declare the lock for removal. First the lock will be acquired in exclusive mode if you don't already own it, then the lock will be put in a state where any future and pending acquire() fail.
|
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Fri Sep 3 12:34:45 2010 | http://epydoc.sourceforge.net |