[Python-Dev] sched module - still useful?

Guido van Rossum guido at python.org
Mon Oct 8 22:40:37 CEST 2007


It looks like it doesn't mind if delayfunc() returns early;
delayfunc() may insert new events into the queue.

I also think this could be used in a simulation, hence the
parameterization of timefunc() and delayfunc().

On 10/8/07, skip at pobox.com <skip at pobox.com> wrote:
>
> I apologize in advance for the somewhat provocative subject.  Is the sched
> module still appropriate in an increasingly event-driven world?  If so, can
> someone suggest how it might be used with a non-blocking delay function such
> as gobject.timeout_add?  It would be nice to either remark in the
> documentation that the sched module doesn't play nice with event-driven
> architectures or provide an example of how it can.  It doesn't seem to be
> possible without resorting to threads (not generally a big problem, but not
> always the best choice either, depending on the environment in which you
> find yourself).  The delayfunc is called and when it finishes, the action
> function is called.
>
> Thx,
>
> Skip
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: http://mail.python.org/mailman/options/python-dev/guido%40python.org
>


-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-Dev mailing list