41#ifndef UFO_UTILITY_SPINLOCK_HPP
42#define UFO_UTILITY_SPINLOCK_HPP
82 [[nodiscard]]
bool try_lock()
noexcept;
93 std::atomic_flag flag_ = ATOMIC_FLAG_INIT;
A simple spinlock implementation using std::atomic_flag.
bool try_lock() noexcept
Attempts to acquire the lock without blocking.
void lock() noexcept
Acquires the lock. Spins until the lock is available.
void unlock() noexcept
Releases the lock and notifies one waiting thread.
All vision-related classes and functions.