Loading...
Searching...
No Matches
stdex::spinlock Class Reference

Spin-lock. More...

`#include <stdex/spinlock.hpp>`

## Public Member Functions

void | lock () noexcept
| Blocks until a lock can be acquired for the current execution agent (thread, process, task).
bool | try_lock () noexcept
| Attempts to acquire the lock for the current execution agent (thread, process, task) without blocking.
void | unlock () noexcept
| Releases the non-shared lock held by the execution agent.

## Detailed Description

Spin-lock.

See also
  Correctly implementing a spinlock in C++

## Member Function Documentation

## try_lock()

bool stdex::spinlock::try_lock | ( |  | ) |

inlinenoexcept

Attempts to acquire the lock for the current execution agent (thread, process, task) without blocking.

Returns
  true if the lock was acquired, false otherwise

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

- include/stdex/spinlock.hpp