AUI Framework
master
Cross-platform module-based framework for developing C++20 desktop applications
|
Synchronization primitive that is implemented with atomic values instead of doing syscalls. More...
Synchronization primitive that is implemented with atomic values instead of doing syscalls.
In contrast to a regular mutex, threads will busy-wait (infinitely check for unlocked state) and waste CPU cycles instead of yielding the CPU to another thread with a syscall.
ASpinlockMutex may be faster than a regular mutex in some cases. Use benchmarks to compare.
Public Member Functions | |
void | lock () |
bool | try_lock () noexcept |
Tries to acquire the mutex without blocking. More... | |
void | unlock () noexcept |
|
inlinenoexcept |
Tries to acquire the mutex without blocking.
#include <AUI/Thread/AMutex.h>