Table of Contents

Module: event_threads ./src/peak/events/
Imported modules   
from __future__ import generators
from interfaces import *
from peak.core import protocols, adapt, NOT_GIVEN
from peak.util.advice import advice
from sources import Condition, Value, AnyOf, Observable
from sys import exc_info, _getframe
import time
import traceback
from types import GeneratorType
resume ()

Call this after every yield in a task

This function returns the event that caused the task to resume, or reraises any exceptions thrown by a nested generator in the task. It should be called after every yield statement in a task, if the statement yields a generator or an ITaskSwitch or IEventSource. (If the statement simply yields a value to its calling generator, it need not be followed by an events.resume() call.)

Note that you should still call this function even if you don't need its return value. Otherwise, errors from other generators will be silently lost.

t, v, tb


Interrupt a task with an error if specified event occurs



Time-based event sources; see events.IScheduler for interface


Thread-like "task" that pauses and resumes in response to events


Tracks the state of a task; see events.ITaskState for details


events.Task' that handles errors better, by relying on a scheduler



Wrap a generator function to return a new Task each time it's called

Table of Contents

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