YACLib
C++ library for concurrent tasks execution
|
SharedMutex for coroutines. More...
#include <shared_mutex.hpp>
Public Types | |
using | Base = detail::SharedMutexImpl< FIFO, ReadersFIFO > |
Public Member Functions | |
auto | Lock () noexcept |
auto | LockShared () noexcept |
auto | TryGuard () noexcept |
auto | TryGuardShared () noexcept |
auto | Guard () noexcept |
auto | GuardShared () noexcept |
bool | TryLock () noexcept |
bool | TryLockShared () noexcept |
void | UnlockHere () noexcept |
void | UnlockHereShared () noexcept |
Static Public Member Functions | |
template<typename To , typename From > | |
static auto & | Cast (From &from) noexcept |
Additional Inherited Members | |
Protected Member Functions inherited from yaclib::detail::SharedMutexImpl< FIFO, ReadersFIFO > | |
bool | TryLockSharedAwait () noexcept |
bool | TryLockAwait () noexcept |
bool | AwaitLockShared (BaseCore &curr) noexcept |
bool | AwaitLock (BaseCore &curr) noexcept |
bool | TryLockShared () noexcept |
bool | TryLock () noexcept |
void | UnlockHereShared () noexcept |
void | UnlockHere () noexcept |
SharedMutex for coroutines.
TODO(MBkkt) benchmark different options
FIFO | – if true readers and writers in "single" queue, on practice with false it will alternate writers and readers |
ReadersFIFO | – readers resume order |
WritersFIFO | – writers lock acquiring order Configs: 1 0 – default, cares about honest order between critical sections that not intersects, but doesn't cares for other! 0 0 – cares only about throughput and liveness 1 1 – cares in first priority about order of critical sections 0 1 – opposite to default, but it's usefullness is doubtful |
Definition at line 202 of file shared_mutex.hpp.
using yaclib::SharedMutex< FIFO, ReadersFIFO >::Base = detail::SharedMutexImpl<FIFO, ReadersFIFO> |
Definition at line 204 of file shared_mutex.hpp.
|
inlinestaticnoexcept |
Definition at line 243 of file shared_mutex.hpp.
References yaclib::MakeContract().
|
inlinenoexcept |
Definition at line 232 of file shared_mutex.hpp.
|
inlinenoexcept |
Definition at line 236 of file shared_mutex.hpp.
|
inlinenoexcept |
Definition at line 216 of file shared_mutex.hpp.
|
inlinenoexcept |
Definition at line 220 of file shared_mutex.hpp.
|
inlinenoexcept |
Definition at line 224 of file shared_mutex.hpp.
|
inlinenoexcept |
Definition at line 228 of file shared_mutex.hpp.
|
inlinenoexcept |
Definition at line 67 of file shared_mutex.hpp.
|
inlinenoexcept |
Definition at line 57 of file shared_mutex.hpp.
|
inlinenoexcept |
Definition at line 81 of file shared_mutex.hpp.
|
inlinenoexcept |
Definition at line 71 of file shared_mutex.hpp.