12 #include <shogun/lib/config.h> 27 while (m_locked.load(std::memory_order_relaxed))
30 while (m_locked.exchange(
true, std::memory_order_acquire));
36 m_locked.store(
false, std::memory_order_release);
41 std::atomic_bool m_locked = {
false };
Class Lock used for synchronization in concurrent programs.
SG_FORCED_INLINE void lock()
static SG_FORCED_INLINE void CpuRelax()
all of classes and functions are contained in the shogun namespace
SG_FORCED_INLINE void unlock()