mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-25 00:00:18 +02:00
sync: document that Barrier::wait is not cancel safe (#6494)
Signed-off-by: Alice Ryhl <[email protected]>
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user