-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid spawning the same scheduled task multiple times (#252)
* Revert "Fix scheduler.once() running multiple times (#231)" This reverts commit d4f78c5. The same bug exists not only in schedule.once() but also schedule.every() so a better fix is necessary. * Add tests to capture abnormal consecutive execution of scheduled tasks * Test using a threadpool The threadpool already has a dedicated thread to run scheduler tasks which is not the same as running in the main thread. * Disable tests that can't be fixed * The schedule module is not designed to run in a non-blocking fashion This forces code to run sequentially on the scheduler thread. fixes #231 (again)
- Loading branch information
Showing
2 changed files
with
60 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters