Skip to content

Commit

Permalink
sync: make CancellationToken UnwindSafe (#5438)
Browse files Browse the repository at this point in the history
  • Loading branch information
Darksonn authored Feb 9, 2023
1 parent d6dbefc commit 8b44077
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tokio-util/src/sync/cancellation_token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ pub struct CancellationToken {
inner: Arc<tree_node::TreeNode>,
}

impl std::panic::UnwindSafe for CancellationToken {}
impl std::panic::RefUnwindSafe for CancellationToken {}

pin_project! {
/// A Future that is resolved once the corresponding [`CancellationToken`]
/// is cancelled.
Expand Down

0 comments on commit 8b44077

Please sign in to comment.