# Class k.t.WaitForCall(WaitCondition):

Part of kiwi.tasklet View In Hierarchy

An object that waits until it is called.

This example demonstrates how a tasklet waits for a callback:

     import gobject
     from kiwi import tasklet

     mainloop = gobject.MainLoop()

     def my_task():
         callback = tasklet.WaitForCall()
         gobject.timeout_add(1000, callback)
         yield callback
         mainloop.quit()

     tasklet.run(my_task())
     mainloop.run()

Instance Variables | return_value | value to return when called

Method | __init__ | Creates a wait condition that is actually a callable object, and waits for a call to be made on it.
Method | arm | Overrides WaitCondition.arm
Method | disarm | Overrides WaitCondition.disarm
Method | __call__ | Undocumented

def __init__(self, return_value=None):
overrides kiwi.tasklet.WaitCondition.__init__
Creates a wait condition that is actually a callable object, and waits for a call to be made on it.

Parameters | return_value | value to return when called; can also be modified dynamically from the tasklet as the `return_value` instance variable.

def arm(self, tasklet):
overrides kiwi.tasklet.WaitCondition.arm
Overrides WaitCondition.arm

def disarm(self):
overrides kiwi.tasklet.WaitCondition.disarm
Overrides WaitCondition.disarm

def __call__(self, *args, **kwargs):
Undocumented