Skip to content

A wrapper of Tokio's JoinHandle that aborts the task when it's dropped, while still allowing it to be awaited for joining.

Notifications You must be signed in to change notification settings

cyb0124/abort-on-drop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A wrapper of Tokio's JoinHandle that aborts the task when it's dropped, while still allowing it to be awaited for joining.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages