4 releases
| 0.2.2 | Aug 4, 2022 |
|---|---|
| 0.2.1 | Apr 27, 2022 |
| 0.2.0 | Apr 27, 2022 |
| 0.1.0 | Apr 27, 2022 |
#1543 in Asynchronous
14,910 downloads per month
Used in 5 crates
(2 directly)
6KB
116 lines
This crate provides a wrapper type of Tokio's JoinHandle: ChildTask, which aborts the task when it's dropped.
ChildTask can still be awaited to join the child-task, and abort-on-drop will still trigger while it is being awaited.
For example, if task A spawned task B but is doing something else, and task B is waiting for task C to join, aborting A will also abort both B and C.
abort-on-drop
This crate provides a wrapper type of Tokio's JoinHandle: ChildTask, which aborts the task when it's dropped. ChildTask can still be awaited to join the child-task, and abort-on-drop will still trigger while it is being awaited.
For example, if task A spawned task B but is doing something else, and task B is waiting for task C to join, aborting A will also abort both B and C.
Dependencies
~2–3MB
~48K SLoC