Dobby
3.0
Dobby “Docker based Thingy” is a tool for managing and running OCI containers using crun
|
#include <SpinLock.h>
Public Member Functions | |
void | lock () |
void | unlock () |
bool | try_lock () |
Private Attributes | |
std::atomic_flag | mLocked |
Basic spinlock used in the PollLoop and Jumper objects as locking is needed but a mutex is overkill. It has the same basic API as std::mutex so can be swapped out, in addition it implements the C++ BasicLockable and Lockable requirements meaning it can be used as a template for std::unique_lock and std::lock_guard.