[issue1641] asyncore delayed calls feature
Guido van Rossum
report at bugs.python.org
Tue Mar 3 19:44:28 CET 2009
Guido van Rossum <guido at python.org> added the comment:
The idea is to be able (whether you see a use case or not) to use
different tasks lists simultaneously. Messing with globals is the worst
possible API for that. All you need is to add a tasks=None argument to
the loop() signature, rename the global tasks list to (e.g.)
default_tasks, and add this to the top of loop:
if tasks is None:
tasks = default_tasks
similar to what it does for map. You'd also have to pass the tasks list
to the scheduler() call and the call_later() constructor. Defaulting to
a global is fine.
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1641>
_______________________________________
More information about the Python-bugs-list
mailing list