class documentation

class SingleNotifyPipeCondition(_BaseCondition):

View In Hierarchy

Condition which can only be notified once.

This condition class uses pipes and poll, internally, to be able to wait for notification with a timeout, without resorting to polling. It is almost compatible with Python's threading.Condition, with the following differences:

  • notify_all can only be called once, and no wait can happen after that
  • notify is not supported, only notify_all
Method __init__ Constructor for SingleNotifyPipeCondition
Method notify_all Close the writing side of the pipe to notify all waiters.
Method wait Wait for a notification.
Class Variable __slots__ Undocumented
Method _check_unnotified Throws an exception if already notified.
Method _Cleanup Cleanup open file descriptors, if any.
Instance Variable _notified Undocumented
Instance Variable _nwaiters Undocumented
Instance Variable _read_fd Undocumented
Instance Variable _write_fd Undocumented

Inherited from _BaseCondition:

Instance Variable acquire Undocumented
Instance Variable release Undocumented
Method _base_acquire_restore Undocumented
Method _base_is_owned Check whether lock is owned by current thread.
Method _base_release_save Undocumented
Method _check_owned Raise an exception if the current thread doesn't own the lock.
Instance Variable _acquire_restore Undocumented
Instance Variable _is_owned Undocumented
Instance Variable _lock Undocumented
Instance Variable _release_save Undocumented
def __init__(self, lock):

Constructor for SingleNotifyPipeCondition

def notify_all(self):

Close the writing side of the pipe to notify all waiters.

def wait(self, timeout):

Wait for a notification.

Parameters
timeout:float or NoneWaiting timeout (can be None)
__slots__: list[str] =
def _check_unnotified(self):

Throws an exception if already notified.

def _Cleanup(self):

Cleanup open file descriptors, if any.

_notified: bool =

Undocumented

_nwaiters: int =

Undocumented

_read_fd =

Undocumented

_write_fd =

Undocumented