diff options
| author | Aleksey Kladov <aleksey.kladov@gmail.com> | 2018-08-03 14:18:06 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-08-03 14:18:06 +0300 |
| commit | 94de821002f3378a59c2bf812ce73756f3ed0512 (patch) | |
| tree | e711040a3a02e31ab53f779ca0d745373f3b3d4a /src/libstd/sync | |
| parent | 4dae47051315793d4d4d043b4b8b03c51e3dc877 (diff) | |
| download | rust-94de821002f3378a59c2bf812ce73756f3ed0512.tar.gz rust-94de821002f3378a59c2bf812ce73756f3ed0512.zip | |
Specify reentrancy gurantees of `Once::call_once`
Diffstat (limited to 'src/libstd/sync')
| -rw-r--r-- | src/libstd/sync/once.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libstd/sync/once.rs b/src/libstd/sync/once.rs index 10282ecb658..113fbbf1f61 100644 --- a/src/libstd/sync/once.rs +++ b/src/libstd/sync/once.rs @@ -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 /// /// ``` |
