This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ernestum
Recipients ernestum
Date 2019-06-06.12:06:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1559822786.43.0.93146538102.issue37174@roundup.psfhosted.org>
In-reply-to
Content
When I remove all events from a scheduler while its run() is being executed (with blocking=True in another thread), run() continues to block for some time because it is caught in its delayfunc which is time.sleep by default.

This issue can easily be solved by using the wait() function of a threading.Event as the delayfunc and setting the event whenever the queue becomes empty. The referenced pull request adds this functionality by default.

I also added a cancel_all() method which should be far more efficient than iterating all events and deleting them individually.
History
Date User Action Args
2019-06-06 12:06:26ernestumsetrecipients: + ernestum
2019-06-06 12:06:26ernestumsetmessageid: <1559822786.43.0.93146538102.issue37174@roundup.psfhosted.org>
2019-06-06 12:06:26ernestumlinkissue37174 messages
2019-06-06 12:06:26ernestumcreate