From d44e995bb00738d670edb33246ad25375df40638 Mon Sep 17 00:00:00 2001 From: Alice Ryhl Date: Tue, 14 Nov 2023 20:13:43 +0100 Subject: [PATCH] task: document cancel safety of `LocalSet::run_until` (#6147) Closes: #6122 --- tokio/src/task/local.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tokio/src/task/local.rs b/tokio/src/task/local.rs index 9caaca629..3e5c93abb 100644 --- a/tokio/src/task/local.rs +++ b/tokio/src/task/local.rs @@ -602,6 +602,10 @@ impl LocalSet { /// will remain on the local set, and will be driven on subsequent calls to /// `run_until` or when [awaiting the local set] itself. /// + /// # Cancel safety + /// + /// This method is cancel safe when `future` is cancel safe. + /// /// # Examples /// /// ```rust