(self, name)
Get the named lock.
        If the semaphore representing the lock does not exit, create it in a thread safe way.
        Note that this is always a blocking call that will wait until the lock is available.

        @param name - The name of the lock
Get the named lock.
        If the semaphore representing the lock does not exit, create it in a thread safe way.
        Note that this is always a blocking call that will wait until the lock is available.
Get the named lock . If the semaphore representing the lock does not exit create it in a thread safe way . Note that this is always a blocking call that will wait until the lock is available .
def get_named_lock(self, name):
        """
        Get the named lock.
        If the semaphore representing the lock does not exit, create it in a thread safe way.
        Note that this is always a blocking call that will wait until the lock is available.

        @param name - The name of the lock
        """
        # Global critical section
        self._named_locks_lock.acquire()
        if not name in self._named_locks:
            self._named_locks[name] = BoundedSemaphore()
        self._named_locks_lock.release()
        # End global critical section

        self.log.debug("Grabbing named lock (%s)" % name)
        self._named_locks[name].acquire()
        self.log.debug("Got named lock (%s)" % name)
def get_named_lock ( self , name ) : # Global critical section self . _named_locks_lock . acquire ( ) if not name in self . _named_locks : self . _named_locks [ name ] = BoundedSemaphore ( ) self . _named_locks_lock . release ( ) # End global critical section self . log . debug ( "Grabbing named lock (%s)" % name ) self . _named_locks [ name ] . acquire ( ) self . log . debug ( "Got named lock (%s)" % name )