I have incorporated a scheduler module that is largely Kronos by Irmen
de Jong. (I changed the names to be more PEP8 like, added
cancelability, keyword arguments for tasks, and functions that use a
singleton ThreadedScheduler).

Kronos is nice and fairly flexible. It uses 1 thread for running the
scheduling, and individual tasks can run in that same thread, a new
thread *or* a forked process. Here's an interactive session as an
example:

In [20]:task = scheduler.add_interval_task(printmsg, 2, ("Hi",))

In [21]:scheduler._start_scheduler()
Hi

In [22]:Hi
Hi
scheduler.cancelHi
(task)

In [23]:


Scheduling of tasks is a very commonly useful thing (I'm already using
scheduling, but not this module, for tg.org, so I know it's useful).

Kevin

--
Kevin Dangoor
TurboGears / Zesty News

email: [EMAIL PROTECTED]
company: http://www.BlazingThings.com
blog: http://www.BlueSkyOnMars.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Trunk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears-trunk
-~----------~----~----~----~------~----~------~--~---

Reply via email to