Charles-François Natali added the comment:
OK, I just created #17956 for ScheduledExecutor, closing this one.
--
resolution: - duplicate
stage: test needed - committed/rejected
status: open - closed
superseder: - add ScheduledExecutor
___
Python
Charles-François Natali added the comment:
I'm attaching a proof of concept code for a ScheduledExecutor
interface, and a ScheduledThreadPoolExecutor implementation
(unfortunately I can't upload it as a mercurial diff for now).
Here's what the API looks like:
from concurrent.futures import
Charles-François Natali added the comment:
IMO, this shouldn't be implemented atop thread, but ought to be a regular
thread pool: this way, you won't get behind if some task takes too long to
execute, the thread pool can start new threads as needed, and we get the
general work submit/cancel
R. David Murray added the comment:
I take your point; I knew there was something bothering me about how the tasks
were handled but I didn't consciously see the bug. I like the idea of a
ScheduledExecutor.
Yael, thanks a lot for working through this, but I think we should probably
close this
R. David Murray added the comment:
Review comments added.
--
nosy: +r.david.murray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue995907
___
___
Yael added the comment:
Can you please review the patch? thanks!
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue995907
___
___
Python-bugs-list
Yael added the comment:
Added a class Threading.TimerPool. This new class spawns one thread, and that
thread is running as long as there are active timers.
--
keywords: +patch
Added file: http://bugs.python.org/file29853/mywork.patch
___
Python
Yael added the comment:
I am working on a patch for a new class that uses a single background thread,
it should be ready soon. One unintended consequence of this change is that with
one thread, multiple timers that have the same timeout will no longer run in
parallel, but one after the other.
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
versions: +Python 3.2 -Python 2.7
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue995907
___
Daniel Diniz aja...@gmail.com added the comment:
Can't quite understand what the problem is supposed to be, comments?
--
nosy: +ajaksu2
stage: - test needed
type: - feature request
versions: +Python 2.7 -Python 2.3
___
Python tracker
Antoine Pitrou pit...@free.fr added the comment:
I can't understand problem number 1 either. I suspect it is a
misunderstanding by the poster, since he is talking about a destructor
of the c++ based library and there's no c++ code in the interpreter.
As for number 2, it is a legitimate feature
11 matches
Mail list logo