-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(iroh): improve Router shutdown (#2978)
## Description - `iroh::protocol::Router - `shutdown` now takes `&self` - `shutdown` is idempotent, and will immediately return if already shutdown - there is now a `is_shutdown` method to check if the router is already closed - spawned tasks are cancelled through the cancel token as well, to improve shutdown speed - use `Arc<Mutex<Option<JoinHandle>>>` instead of `Shared<JoinHandle>` to more cleanly represent shutdown ## Breaking Changes - `iroh::protocol::Router::shutdown` takes `&self` instead of `self` ## Change checklist - [x] Self-review. - [x] Documentation updates following the [style guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text), if relevant. - [ ] Tests if relevant. - [x] All breaking changes documented.
- Loading branch information
1 parent
43d0ea4
commit fbcaaa5
Showing
1 changed file
with
46 additions
and
36 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