Source code for pathex.adts.concurrency.counted_condition
from threading import Condition
__all__ = ['CountedCondition']
[docs]class CountedCondition(Condition):
def __init__(self, lock):
"""
Args:
lock_class (Lock): This is the class of the underlying lock.
"""
super().__init__(lock)
self._waiting_count = 0
@property
def waiting_count(self) -> int:
return self._waiting_count