sync: document that Barrier::wait is not cancel safe (#6494)

Signed-off-by: Alice Ryhl <[email protected]>
This commit is contained in:
Alice Ryhl
2024-04-18 17:21:34 +02:00
committed by GitHub
parent 9c6ff3b7e5
commit 5ba12a7145
+4
View File
@@ -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(