Class k.t.WaitCondition(object):

Part of kiwi.tasklet

known subclasses: kiwi.tasklet.WaitForCall, kiwi.tasklet.WaitForIO, kiwi.tasklet.WaitForTimeout, kiwi.tasklet.WaitForIdle, kiwi.tasklet.WaitForTasklet, kiwi.tasklet.WaitForSignal, kiwi.tasklet.WaitForProcess, kiwi.tasklet.WaitForMessages

Base class for all wait-able condition objects.

WaitConditions are used in a yield statement inside tasklets body for specifying what event(s) it should wait for in order to receive control once more.

Function__init__

Abstract base class, do not call directly

Functionarm

Prepare the wait condition to receive events.

Functiondisarm

Stop the wait condition from receiving events.

def __init__(self):

Abstract base class, do not call directly

def arm(self, tasklet):

Prepare the wait condition to receive events.

When a wait condition receives the event it is waiting for, it should call the method wait_condition_fired of the tasklet with the wait condition as argument. The method returns True or False; if it returns True, it means the WaitCondition object must "rearm" itself (continue to monitor events), otherwise it should disarm.

def disarm(self):

Stop the wait condition from receiving events.