Table of Contents

Class: IBasicReactor ./src/peak/running/interfaces.py
I/O Scheduler
twisted.internet.reactor or a substitute

Twisted reactors actually do a lot more than this, but this is all we need for basic "running" operations that don't involve support for specialized protocols. This is a simple enough set of operations that we should be able to provide an "unTwisted" implementation.

Base Classes   
Interface
Methods   
addReader
addWriter
callLater
crash
iterate
removeReader
removeWriter
run
stop
  addReader 
addReader ( reader )

Register reader file descriptor to receive doRead() calls

reader must have a fileno() method and a doRead() method.

  addWriter 
addWriter ( writer )

Register writer file descriptor to receive doWrite() calls

writer must have a fileno() method and a doWrite() method.

  callLater 
callLater (
        delay,
        callable,
        *args,
        *kw,
        )

Invoke callable after delay seconds with 'args, *kw'

  crash 
crash ()

Cause run() to exit at the earliest possible moment

  iterate 
iterate ( delay=0 )

Handle scheduled events, then do I/O for up to delay seconds

  removeReader 
removeReader ( reader )

Unregister reader

  removeWriter 
removeWriter ( writer )

Unregister writer

  run 
run ( installSignalHandlers=True )

Loop polling for IO or GUI events and calling scheduled funcs

  stop 
stop ()

Cause run() to exit after pending scheduled calls are finished


Table of Contents

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