def release(self):
        """Release the lock."""
        with self._lock:
            if not self._locked:
                raise RuntimeError('lock not currently held')
            elif self._reentrant and self._owner is not fibers.current():
                raise RuntimeError('lock not owned by this fiber')
            self._release()
def release ( self ) : with self . _lock : if not self . _locked : raise RuntimeError ( 'lock not currently held' ) elif self . _reentrant and self . _owner is not fibers . current ( ) : raise RuntimeError ( 'lock not owned by this fiber' ) self . _release ( )
Release the lock.