def _base_is_owned(self):
    if self._lock.acquire(0):
      self._lock.release()
      return False
    return True
Check whether lock is owned by current thread.
dataset/ETHPy150Open ganeti/ganeti/lib/locking.py/_BaseCondition._base_is_owned