Skip to content

Commit 94de821

Browse files
authored
Specify reentrancy gurantees of Once::call_once
1 parent 4dae470 commit 94de821

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/libstd/sync/once.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,10 @@ impl Once {
178178
/// happens-before relation between the closure and code executing after the
179179
/// return).
180180
///
181+
/// If the given closure recusively invokes `call_once` on the same `Once`
182+
/// instance the exact behavior is not specified, allowed outcomes are
183+
/// a panic or a deadlock.
184+
///
181185
/// # Examples
182186
///
183187
/// ```

0 commit comments

Comments
 (0)