Specify reentrancy gurantees of Once::call_once

This commit is contained in:
Aleksey Kladov 2018-08-03 14:18:06 +03:00 committed by GitHub
parent 4dae470513
commit 94de821002
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -178,6 +178,10 @@ impl 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
///
/// ```