E&S CVS Commit: PEAK - Second draft for 'peak.events'. The idea of a "reactor" has been replaced

pje at eby-sarna.com pje at eby-sarna.com
Thu Jan 1 20:14:00 EST 2004

Module Name:	PEAK
Committed By:	pje
Date:		Fri Jan  2 01:13:04 UTC 2004

Modified Files:
	PEAK/src/peak/events: event_threads.py interfaces.py sources.py

Log Message:
Second draft for 'peak.events'.  The idea of a "reactor" has been replaced
with the idea of a "clock", which is more minimalistic in that it deals
only with time and the lifecycle of the program.  I/O event management is
sidelined to an 'ISelector' that can hook onto the "ticks" emitted by the
"clock" in order to monitor I/O between scheduled thread executions.
The "clock" also automatically stops when all "foreground" threads have
finished, even if "background" threads are still running.  In
addition, it should easy to add in other event loop hooks (for e.g. GUI
system events) by creating similar threads that yield on 'clock.now'.
(Indeed, we'll probably use a similar technique to run our existing
reactor-based code, and other users' twisted-based code, by pinging
'reactor.iterate()' from such a thread.)

Interface terminology seems to be getting clean and stabilizing, enough
to begin creating unit tests.  And the code itself seems mostly
comprehensible, except for the one or two hairy  methods that make
'events.Thread' possible.

To view diffs of this commit, you can use the following URL(s):

To generate a diff of this commit:
cvs rdiff -r1.1 -r1.2 PEAK/src/peak/events/event_threads.py \
    PEAK/src/peak/events/interfaces.py PEAK/src/peak/events/sources.py

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

More information about the source-changes mailing list