Table of Contents

Class: ITaskSwitch ./src/peak/events/interfaces.py

What a task yields control to

IProcedure objects running in a task yield ITaskSwitch objects to control the task's flow and co-operation.

In addition to PEAK-supplied event sources like Value, Semaphore, and Condition, generator-iterators and other IProcedure objects are also adaptable to ITaskSwitch, thus allowing one to e.g. yield someGenerator(someArgs) in a task. This allows the nested generator to run as the next procedure for the task.

Base Classes   
protocols.Interface
Methods   
nextAction
  nextAction 
nextAction ( task=None,  state=None )

Return true if task should continue

If supplied, task and state are an ITask and ITaskState, respectively, and the task switch may perform any needed actions with them, such as arranging to call back task.step(), or performing an action such as state.YIELD(value) or state.CALL(task).


Table of Contents

This document was automatically generated on Mon Apr 22 01:11:04 2024 by HappyDoc version 2.1