| |
- __builtin__.object
-
- LockType
- exceptions.Exception(exceptions.BaseException)
-
- error
class LockType(__builtin__.object) |
|
Class implementing dummy implementation of thread.LockType.
Compatibility is maintained by maintaining self.locked_status
which is a boolean that stores the state of the lock. Pickling of
the lock, though, should not be done since if the thread module is
then used with an unpickled ``lock()`` from here problems could
occur from this class not having atomic methods. |
|
Methods defined here:
- __enter__ = acquire(self, waitflag=None)
- __exit__(self, typ, val, tb)
- __init__(self)
- acquire(self, waitflag=None)
- Dummy implementation of acquire().
For blocking calls, self.locked_status is automatically set to
True and returned appropriately based on value of
``waitflag``. If it is non-blocking, then the value is
actually checked and not set if it is already acquired. This
is all done so that threading.Condition's assert statements
aren't triggered and throw a little fit.
- locked(self)
- release(self)
- Release the dummy lock.
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
|