diff options
author | Abseil Team <absl-team@google.com> | 2020-11-30 21:23:11 -0800 |
---|---|---|
committer | vslashg <gfalcon@google.com> | 2020-12-01 09:51:56 -0500 |
commit | 592924480acf034aec0454160492a20bccdbdf3e (patch) | |
tree | 7f390a1dc3cfb802d8d60b067c3a51366a0c3de5 /absl/base/internal/spinlock.h | |
parent | e80c0b3536e1bdee68a874d529a9ba951faffe8b (diff) |
Export of internal Abseil changes
--
7b6a68aa92dcc7247236d1a1813914e035383bf8 by Abseil Team <absl-team@google.com>:
Use atomic exchange to mark completion in absl::once_flag
This prevents a potential for a missed wakeup if one thread marks
itself as a waiter while another thread is completing the invocation.
PiperOrigin-RevId: 344946791
--
ddff21d1dde08d1368d8be5fca81b154e78be2fc by Abseil Team <absl-team@google.com>:
Add missing string_view include. This is currently used transitively through the cord header.
PiperOrigin-RevId: 344845266
GitOrigin-RevId: 7b6a68aa92dcc7247236d1a1813914e035383bf8
Change-Id: Ia24e98a1df832fc4cb491d888fdf21182b5954f4
Diffstat (limited to 'absl/base/internal/spinlock.h')
-rw-r--r-- | absl/base/internal/spinlock.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/absl/base/internal/spinlock.h b/absl/base/internal/spinlock.h index e6ac9e64..dce1c854 100644 --- a/absl/base/internal/spinlock.h +++ b/absl/base/internal/spinlock.h @@ -15,11 +15,8 @@ // // Most users requiring mutual exclusion should use Mutex. -// SpinLock is provided for use in three situations: +// SpinLock is provided for use in two situations: // - for use in code that Mutex itself depends on -// - to get a faster fast-path release under low contention (without an -// atomic read-modify-write) In return, SpinLock has worse behaviour under -// contention, which is why Mutex is preferred in most situations. // - for async signal safety (see below) // SpinLock is async signal safe. If a spinlock is used within a signal |