16#ifndef GMP_DP_LOCK_HPP_
17#define GMP_DP_LOCK_HPP_
48 while (flag_.test_and_set(std::memory_order_acquire));
55 flag_.clear(std::memory_order_release);
A minimal spin lock built on std::atomic_flag.
void unlock()
Release the lock.
void lock()
Acquire the lock by spinning until it becomes available.