E&S CVS Commit: PEAK - First draft implementation of system scheduling proposal. (Also, misc.

pje at eby-sarna.com pje at eby-sarna.com
Wed Apr 16 08:51:00 EDT 2003

Module Name:	PEAK
Committed By:	pje
Date:		Wed Apr 16 12:50:18 UTC 2003

Modified Files:
	PEAK/src/peak: exceptions.py
	PEAK/src/peak/running: daemons.py interfaces.py
Added Files:
	PEAK/src/peak/running: scheduler.py

Log Message:
First draft implementation of system scheduling proposal.  (Also, misc.
TODO additions.) Interfaces have been streamlined and names changed.
Daemons are now "periodic tasks", and the provided base class implements an
"adaptive task" interface.  "Daemonic app", "event loop", and "daemon
scheduler" are now just a single "system scheduler" interface, which can
schedule periodic tasks as well as one-offs.  I settled on "higher priority
number" = "higher priority" for priority sorting.

I'm beginning to like this whole "asynchronous programming" model that
Twisted provides.  AdaptiveTask (formerly BaseDaemon) is a lot simpler,
MultiDaemon went away, and the system scheduler is only two screens
of code to manage idle timeouts, prioritized task scheduling, and more.
Heck, "shutdown after X" was as simple as 'callLater(duration,self.stop)'!

There is one minor problem in this draft...  if a task raises an unhandled
exception, it won't be scheduled for further re-run.  I'm not sure if this
is a bug or feature yet.  It should be easy to fix, though.

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

To generate a diff of this commit:
cvs rdiff -r1.43 -r1.44 PEAK/TODO.txt
cvs rdiff -r1.4 -r1.5 PEAK/src/peak/exceptions.py
cvs rdiff -r1.4 -r1.5 PEAK/src/peak/running/daemons.py
cvs rdiff -r1.1 -r1.2 PEAK/src/peak/running/interfaces.py
cvs rdiff -r0 -r1.1 PEAK/src/peak/running/scheduler.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