Jeffrey Yasskin <jyass...@gmail.com> added the comment:

Java's Timer class tends to be discouraged these days in favor of 
ScheduledExecutorService.scheduleAtFixedRate and .scheduleWithFixedDelay 
(http://download.oracle.com/javase/7/docs/api/java/util/concurrent/ScheduledExecutorService.html).
 Could you say why you modeled this interface off of java.util.Timer instead of 
ScheduledExecutor? See http://www.python.org/dev/peps/pep-3148/ for the basis 
of executors in Python.

I'm skeptical of having a PeriodicTimer that embeds a fixed-delay timing. Both 
fixed-rate and fixed-delay are useful for different things, and given the 
ambiguity we probably shouldn't give in to the temptation to guess. 

I'm skeptical of having a new thread per periodic task. It's a little more work 
to multiplex tasks onto shared threads, and maybe that work isn't worth it for 
now, but I think the interface should allow future implementations to multiplex 
their tasks.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue1676820>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to