def _count_pending(self):
    self.__lock.acquire()
    try:
      return sum(len(prioqueue) for (_, prioqueue) in self.__pending)
    finally:
      self.__lock.release()
Returns the number of pending acquires.
dataset/ETHPy150Open ganeti/ganeti/lib/locking.py/SharedLock._count_pending