Message116640
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. |
|
Date |
User |
Action |
Args |
2010-09-16 23:42:16 | jyasskin | set | recipients:
+ jyasskin, loewis, sonderblade, aminusfu, pitrou, BreamoreBoy |
2010-09-16 23:42:15 | jyasskin | set | messageid: <1284680535.83.0.13218038411.issue1676820@psf.upfronthosting.co.za> |
2010-09-16 23:42:09 | jyasskin | link | issue1676820 messages |
2010-09-16 23:42:08 | jyasskin | create | |
|