Table of Contents

Class: ThreadedScheduler Twisted-0.17.4/twisted/internet/task.py

I am a thread-aware delayed scheduler of for synchronous event loops.

This lets threads execute non-thread safe code by adding it to the scheduler. Tasks added to this scheduler will not be stored persistently.

This is an implementation of the Active Object pattern, and can be used as part of the queueing layer for the Async/Half-Async pattern. The other half the Async/Half-Async pattern is twisted.internet.threadtask.

For more details:

1) POSA2 book - http://www.cs.wustl.edu/~schmidt/POSA/

2) Active Object - http://www.cs.wustl.edu/~schmidt/PDF/Act-Obj.pdf

3) Async/Half-Async - http://www.cs.wustl.edu/~schmidt/PDF/PLoP-95.pdf

Methods   
__getstate__
__init__
__setstate__
addTask
runUntilCurrent
timeout
  __getstate__ 
__getstate__ ( self )

  __init__ 
__init__ ( self )

  __setstate__ 
__setstate__ ( self )

  addTask 
addTask (
        self,
        function,
        *args,
        *kwargs,
        )

Schedule a function to be called by the main event-loop thread.

The result of the function will not be returned.

  runUntilCurrent 
runUntilCurrent ( self )

  timeout 
timeout ( self )

Either I have work to do immediately, or no work to do at all.


Table of Contents

This document was automatically generated on Sat Apr 20 01:30:49 2002 by HappyDoc version 2.0