Example #1
0
    def __init__(self, connection_object):
        self.debug = 0
        self.connection = connection_object
        self.connected = 0

        # Note: The following lock guards transactions
        self.transaction_lock = gdutil.get_lock()

        # Note: The following lock guards changes to the connection (connection,
        #       disconnection, etc.) as well as access to the connection object.
        self.connection_lock = gdutil.get_lock()
Example #2
0
 def __init__(self):
     self._connected = 0
     self.lock = gdutil.get_lock()
 def test_get_lock(self):
     l = gu.get_lock()
     l.acquire()
     l.release()
Example #4
0
 def test_get_lock(self):
     l = gu.get_lock()
     l.acquire()
     l.release()