kiwi.tasklet.WaitForCall(WaitCondition) class documentationkiwi.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 Variable | return_value | value to return when called |
| Method | __init__ | No summary |
| Method | arm | Overrides WaitCondition.arm |
| Method | disarm | Overrides WaitCondition.disarm |
| Method | __call__ | Undocumented |
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. |