|
|
@@ -201,17 +201,6 @@ class Lock(core.Mutex):
|
|
|
def __init__(self, name = "PythonLock"):
|
|
|
core.Mutex.__init__(self, name)
|
|
|
|
|
|
- def acquire(self, blocking = True):
|
|
|
- if blocking:
|
|
|
- core.Mutex.acquire(self)
|
|
|
- return True
|
|
|
- else:
|
|
|
- return core.Mutex.tryAcquire(self)
|
|
|
-
|
|
|
- __enter__ = acquire
|
|
|
-
|
|
|
- def __exit__(self, t, v, tb):
|
|
|
- self.release()
|
|
|
|
|
|
class RLock(core.ReMutex):
|
|
|
""" This class provides a wrapper around Panda's ReMutex object.
|
|
|
@@ -221,18 +210,6 @@ class RLock(core.ReMutex):
|
|
|
def __init__(self, name = "PythonRLock"):
|
|
|
core.ReMutex.__init__(self, name)
|
|
|
|
|
|
- def acquire(self, blocking = True):
|
|
|
- if blocking:
|
|
|
- core.ReMutex.acquire(self)
|
|
|
- return True
|
|
|
- else:
|
|
|
- return core.ReMutex.tryAcquire(self)
|
|
|
-
|
|
|
- __enter__ = acquire
|
|
|
-
|
|
|
- def __exit__(self, t, v, tb):
|
|
|
- self.release()
|
|
|
-
|
|
|
|
|
|
class Condition(core.ConditionVarFull):
|
|
|
""" This class provides a wrapper around Panda's ConditionVarFull
|