[issue29569] threading.Timer class: Continue periodical execution till action returns True

2017-06-06 Thread slytomcat
slytomcat added the comment: done 2017-06-06 14:28 GMT+03:00 Cheryl Sabella <rep...@bugs.python.org>: > > Cheryl Sabella added the comment: > > This bug report has been closed, but the PR is still open. Please close > the PR. Thank you. > > -

[issue29603] More informative Queue class: new method that returns number of unfinished tasks

2017-02-22 Thread slytomcat
slytomcat added the comment: I've closed pull request on GitHub. -- stage: -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue29603] More informative Queue class: new method that returns number of unfinished tasks

2017-02-22 Thread slytomcat
slytomcat added the comment: I can't fully agree with this: >Queue objects are primarily about managing a queue of inputs. >Monitoring and managing consumers is another (mostly orthogonal) realm. Monitoring of consumers is already added via task_done() and join() methods. At least th

[issue29603] More informative Queue class: new method that returns number of unfinished tasks

2017-02-21 Thread slytomcat
slytomcat added the comment: num_threads - unfinished() = the estimation for number of idle threads. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue29603] More informative Queue class: new method that returns number of unfinished tasks

2017-02-21 Thread slytomcat
slytomcat added the comment: One more problem that adjusting of number of threads is performed exactly after placing the new task in the queue. In in some cases we can find that qsuze <> 0 but it doesn't mean that there is no idle threads. It can be equal to 1 (just queued task) as no t

[issue29603] More informative Queue class: new method that returns number of unfinished tasks

2017-02-21 Thread slytomcat
slytomcat added the comment: Not exactly there are 3 cases: If qsize <> 0 it means there is no idle consumers threads, all of them must be busy: we need to create one more. No doubt. If qsize = 0 it means one of two cases: - all consumers threads are busy: we need to create on

[issue29603] More informative Queue class: new method that returns number of unfinished tasks

2017-02-21 Thread slytomcat
slytomcat added the comment: Raymond, Serhiy, thanks for your opinions. I agree that this method like empty, full, and qsize returns information that may be out-of-date in time of its usage. But like those empty, full, and qsize it provides information that helps to make some decisions

[issue29569] threading.Timer class: Continue periodical execution till action returns True

2017-02-20 Thread slytomcat
Changes by slytomcat <slytom...@mail.ru>: -- pull_requests: -81 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29569> ___ __

[issue29603] More informative Queue class: new method that returns number of unfinished tasks

2017-02-20 Thread slytomcat
Changes by slytomcat <slytom...@mail.ru>: -- type: -> enhancement ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29603> ___ __

[issue29603] More informative Queue class: new method that returns number of unfinished tasks

2017-02-20 Thread slytomcat
Changes by slytomcat <slytom...@mail.ru>: -- pull_requests: +158 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29603> ___ __

[issue29569] threading.Timer class: Continue periodical execution till action returns True

2017-02-20 Thread slytomcat
Changes by slytomcat <slytom...@mail.ru>: -- pull_requests: +157 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29569> ___ __

[issue29603] More informative Queue class: new method that returns number of unfinished tasks

2017-02-20 Thread slytomcat
New submission from slytomcat: Class queue.Queue control the number of unfinished tasks via method task_done(). But it is only possible to get the information about all task done (via join() method). I'm sure that exposing the number of unfinished tasks (unfinished_tasks class variable) can

[issue29569] threading.Timer class: Continue periodical execution till action returns True

2017-02-15 Thread slytomcat
New submission from slytomcat: I think that functionality of threading.Timer class can be easily extended to generate the sequence of runs with specified period. The idea comes from the GLib.timeout_add function. Run method of threading.Timer should look like: def run(self

[issue29569] threading.Timer class: Continue periodical execution till action returns True

2017-02-15 Thread slytomcat
Changes by slytomcat <slytom...@mail.ru>: -- pull_requests: +81 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29569> ___ __