mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-17 05:25:37 +03:00
Specify reentrancy gurantees of Once::call_once
This commit is contained in:
@@ -178,6 +178,10 @@ pub const fn new() -> Once {
|
||||
/// happens-before relation between the closure and code executing after the
|
||||
/// return).
|
||||
///
|
||||
/// If the given closure recusively invokes `call_once` on the same `Once`
|
||||
/// instance the exact behavior is not specified, allowed outcomes are
|
||||
/// a panic or a deadlock.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
|
||||
Reference in New Issue
Block a user