Graceful shutdown for the task manager (#6654)
* Initial commit Forked at: 74655ede Parent branch: origin/master * Move task_manager.rs to mod.rs * Graceful shutdown for the task manager * Await all background task JoinHandle at the same time * Add tests * Make future() wait also for exit signal + fix essential task failed Probably related to https://github.com/paritytech/cumulus/issues/111 * add comments for non-obvious code * Use clean_shutdown() in sc-cli * Adapt code and upgrade tokio in sc-cli * cleanup spacing in doc * Add license * I guess actually running the clean shutdown would be a good idea * fix tests * Update client/cli/src/runner.rs Co-authored-by:Benjamin Kampmann <ben@gnunicorn.org> * Improve error logging * disable other tests (can't reproduce on my machine) * Revert "disable other tests (can't reproduce on my machine)" This reverts commit c133c590f33c253123ba0555ce719a71ededd60d. * It is possible that the tasks are ended first * Revert "It is possible that the tasks are ended first" This reverts commit 502aba4a49fb5d892e704c412b8a81768a3f2c71. * Use single threaded scheduler for more predictability * enable_time * Revert "enable_time" This reverts commit 4e152140764a4bddeedff06a4e36ec701909e8c7. * Revert "Use single threaded scheduler for more predictability" This reverts commit ee5e13c5f13ff71e012dcda13579dffeb15f8ffc. * Revert "Revert "It is possible that the tasks are ended first"" This reverts commit 1b91a8ca3eebbdc18be199c8ca188e88669ae649. * This cannot be verified either with a threaded pool * Apply suggestions from code review Co-authored-by:
Bastian Köcher <bkchr@users.noreply.github.com> Co-authored-by:
Benjamin Kampmann <ben@parity.io> Co-authored-by:
Benjamin Kampmann <ben@gnunicorn.org> Co-authored-by:
Bastian Köcher <bkchr@users.noreply.github.com>
Showing
- substrate/Cargo.lock 15 additions, 13 deletionssubstrate/Cargo.lock
- substrate/client/cli/Cargo.toml 1 addition, 1 deletionsubstrate/client/cli/Cargo.toml
- substrate/client/cli/src/runner.rs 7 additions, 12 deletionssubstrate/client/cli/src/runner.rs
- substrate/client/service/Cargo.toml 2 additions, 0 deletionssubstrate/client/service/Cargo.toml
- substrate/client/service/src/config.rs 16 additions, 23 deletionssubstrate/client/service/src/config.rs
- substrate/client/service/src/task_manager/mod.rs 65 additions, 16 deletionssubstrate/client/service/src/task_manager/mod.rs
- substrate/client/service/src/task_manager/tests.rs 210 additions, 0 deletionssubstrate/client/service/src/task_manager/tests.rs
- substrate/client/service/test/src/lib.rs 1 addition, 0 deletionssubstrate/client/service/test/src/lib.rs
- substrate/utils/browser/src/lib.rs 4 additions, 1 deletionsubstrate/utils/browser/src/lib.rs
Please register or sign in to comment