Dobby  3.0
Dobby “Docker based Thingy” is a tool for managing and running OCI containers using crun
Public Member Functions | Private Attributes | List of all members
AICommon::Spinlock Class Reference

#include <SpinLock.h>

Public Member Functions

void lock ()
 
void unlock ()
 
bool try_lock ()
 

Private Attributes

std::atomic_flag mLocked
 

Detailed Description

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.


The documentation for this class was generated from the following file: