diff --git a/tokio/src/sync/barrier.rs b/tokio/src/sync/barrier.rs index a1f87c44a..aa2f9e0cf 100644 --- a/tokio/src/sync/barrier.rs +++ b/tokio/src/sync/barrier.rs @@ -118,6 +118,10 @@ impl Barrier { /// A single (arbitrary) future will receive a [`BarrierWaitResult`] that returns `true` from /// [`BarrierWaitResult::is_leader`] when returning from this function, and all other tasks /// will receive a result that will return `false` from `is_leader`. + /// + /// # Cancel safety + /// + /// This method is not cancel safe. pub async fn wait(&self) -> BarrierWaitResult { #[cfg(all(tokio_unstable, feature = "tracing"))] return trace::async_op(