|
tin
1.5.9
|
#include <sync.h>

Classes | |
| class | lock_awaitable |
Public Member Functions | |
| template<typename... Args> | |
| mutex (Args &&... args) | |
| mutex ()=default | |
| lock_awaitable | lock () noexcept |
| void | unlock () noexcept |
| template<typename Fn > | |
| decltype(auto) | with_lock (Fn &&fn) |
| bool | locked () const noexcept |
| T & | unsafe_value () noexcept |
| T const & | unsafe_value () const noexcept |
Cooperative mutex for coroutine tasks.
The mutex protects a payload value and never blocks an OS thread. A task that awaits lock() is suspended if the mutex is owned; unlock() wakes one waiter. This mutex is intentionally not recursive.
|
inlineexplicit |
|
default |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |