diff --git a/tokio-util/src/sync/cancellation_token.rs b/tokio-util/src/sync/cancellation_token.rs index fbceb2eeb..c44be6986 100644 --- a/tokio-util/src/sync/cancellation_token.rs +++ b/tokio-util/src/sync/cancellation_token.rs @@ -55,6 +55,9 @@ pub struct CancellationToken { inner: Arc, } +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.