abort-on-drop

Crates.ioabort-on-drop
lib.rsabort-on-drop
version0.2.2
sourcesrc
created_at2022-04-27 00:49:53.464939
updated_at2022-08-04 23:24:52.360656
descriptionA wrapper of Tokio's JoinHandle that aborts the task when it's dropped, while still allowing it to be awaited for joining.
homepage
repositoryhttp://github.com/cyb0124/abort-on-drop
max_upload_size
id575768
size5,844
Yibo Cao (cyb0124)

documentation

README

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.

Commit count: 0

cargo fmt