# SpinLock.hpp

This File On Github
Ask A Question

API: latest
module: oatpp
#include "oatpp/core/concurrency/SpinLock.hpp"

# SpinLock

SpinLock implementation based on atomic. Meets the Lockable requirements.

namespace oatpp { namespace concurrency { 
  class SpinLock {}

# Methods

Return Type Name Summary
[none] SpinLock Constructor.
void lock Lock spin-lock
void unlock Unlock spin-lock
bool try_lock Try to lock.

# SpinLock::SpinLock



# SpinLock::lock

Lock spin-lock

void lock()

# SpinLock::unlock

Unlock spin-lock

void unlock()

# SpinLock::try_lock

Try to lock.

  • @return - true if the lock was acquired, false otherwise.

bool try_lock()