Beispiel #1
0
 def __init__(self, lock=None):
     if lock is None:
         lock = DRLock()
     self.__lock = lock
     # Export the lock's acquire() and release() methods
     self.acquire = lock.acquire
     self.release = lock.release
     self.__waiters = []
     self.__atomic = RLock()
Beispiel #2
0
class RLock():
    def __init__(self, **kwargs):
        self.rlock = DRLock()

    def __repr__(self, **kwargs):
        return repr(self.rlock)

    def acquire(self, **kwargs):
        try:
            return self.rlock.acquire(kwargs)
        except Exception as e:
            raise e
        
    def release(self, **kwargs):
        try:
            self.rlock.release(kwargs)
        except Exception as e:
            raise e
    
    def __str__(self, **kwargs):
        return str(self.rlock)
Beispiel #3
0
class RLock():
    def __init__(self):
        self.rlock = DRLock()

    def __repr__(self):
        return repr(self.rlock)

    def acquire(self, _concoord_command):
        try:
            return self.rlock.acquire(_concoord_command)
        except Exception as e:
            raise e
        
    def release(self, _concoord_command):
        try:
            self.rlock.release(_concoord_command)
        except Exception as e:
            raise e
    
    def __str__(self):
        return str(self.rlock)
Beispiel #4
0
class RLock():
    def __init__(self):
        self.rlock = DRLock()

    def __repr__(self):
        return repr(self.rlock)

    def acquire(self, _concoord_command):
        try:
            return self.rlock.acquire(_concoord_command)
        except Exception as e:
            raise e

    def release(self, _concoord_command):
        try:
            self.rlock.release(_concoord_command)
        except Exception as e:
            raise e

    def __str__(self):
        return str(self.rlock)
Beispiel #5
0
 def __init__(self, **kwargs):
     self.rlock = DRLock()
Beispiel #6
0
 def __init__(self):
     self.rlock = DRLock()
Beispiel #7
0
 def __init__(self):
     self.rlock = DRLock()