Message287858
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):
"""Continue execution after wait till function returns True"""
while(not self.finished.wait(self.interval)):
if not self.function(*self.args, **self.kwargs):
break
self.finished.set() |
|
Date |
User |
Action |
Args |
2017-02-15 14:54:10 | slytomcat | set | recipients:
+ slytomcat |
2017-02-15 14:54:10 | slytomcat | set | messageid: <1487170450.59.0.269062661251.issue29569@psf.upfronthosting.co.za> |
2017-02-15 14:54:10 | slytomcat | link | issue29569 messages |
2017-02-15 14:54:10 | slytomcat | create | |
|