| Home | Trees | Index | Help |
|
|---|
| Package kiwi :: Module tasklet :: Class Tasklet |
|
object --+
|
Tasklet
| Method Summary | |
|---|---|
Add a callable to be invoked when the tasklet finishes. | |
Dictionary mapping message names to actions ('accept' or 'discard' or 'defer'). | |
Remove a join callback previously added with add_join_callback | |
Method that executes the task. | |
Send a message to be received by the tasklet as an event. | |
Method that should be called when a wait condition fires | |
| Property Summary | |
|---|---|
message_actions | |
| Class Variable Summary | |
|---|---|
int |
STATE_MSGSEND = 2 |
int |
STATE_RUNNING = 0 |
int |
STATE_SUSPENDED = 1 |
| Method Details |
|---|
add_join_callback(self, callback)Add a callable to be invoked when the tasklet finishes. Return a connection handle that can be used in remove_join_callback() The callback will be called like this:
callback(tasklet, retval)
where tasklet is the tasklet that finished, and retval its return value (or None). When a join callback is invoked, it is automatically removed, so callingremove_join_callback afterwards produces
a KeyError exception.
|
get_message_actions(self)Dictionary mapping message names to actions ('accept' or 'discard' or 'defer'). Should normally not be accessed directly by the programmer. |
remove_join_callback(self, handle)Remove a join callback previously added withadd_join_callback
|
run(self)Method that executes the task. Should be overridden in a subclass if no generator is passed into the constructor. |
send_message(self, message)Send a message to be received by the tasklet as an event.
|
wait_condition_fired(self, triggered_cond)Method that should be called when a wait condition fires |
| Property Details |
|---|
message_actions
|
| Class Variable Details |
|---|
STATE_MSGSEND
|
STATE_RUNNING
|
STATE_SUSPENDED
|
| Home | Trees | Index | Help |
|
|---|
| Generated by Epydoc 2.1 on Thu Oct 19 03:18:14 2006 | http://epydoc.sf.net |