Async++ unknown
Async (co_await/co_return) code for C++
|
RAII type to automatically unlock a mutex once it leaves scope. More...
#include <asyncpp/mutex.h>
Public Member Functions | |
mutex_lock (class mutex &mtx, std::adopt_lock_t) noexcept | |
Construct a mutex_lock for the given mutex, adopting the lock. | |
constexpr | mutex_lock (class mutex &mtx) noexcept |
Construct an unlocked mutex_lock for the given mutex. | |
constexpr | mutex_lock (const mutex_lock &) noexcept=delete |
constexpr mutex_lock & | operator= (const mutex_lock &) noexcept=delete |
constexpr | mutex_lock (mutex_lock &&other) noexcept |
mutex_lock & | operator= (mutex_lock &&other) noexcept |
void | unlock () noexcept |
Unlock the lock See mutex::unlock() for details. | |
bool | try_lock () noexcept |
Try locking the contained mutex. | |
auto | lock () noexcept |
Asynchronously lock the contained mutex. | |
bool | is_locked () const noexcept |
Check if the mutex is held by this lock. | |
class mutex & | mutex () const noexcept |
Get the wrapped mutex. | |
RAII type to automatically unlock a mutex once it leaves scope.
|
inlinenoexcept |
Construct a mutex_lock for the given mutex, adopting the lock.
|
inlineexplicitconstexprnoexcept |
Construct an unlocked mutex_lock for the given mutex.
|
inlinenoexcept |
Asynchronously lock the contained mutex.
See mutex::lock() for details.
|
inlinenoexcept |
Try locking the contained mutex.
See mutex::try_lock() for details.