YACLib
C++ library for concurrent tasks execution
Loading...
Searching...
No Matches
yaclib::StickyGuard< M > Class Template Reference

#include <guard_sticky.hpp>

Inheritance diagram for yaclib::StickyGuard< M >:
[legend]
Collaboration diagram for yaclib::StickyGuard< M >:
[legend]

Public Types

using MutexType = M
 

Public Member Functions

 StickyGuard (StickyGuard &&other) noexcept
 
StickyGuardoperator= (StickyGuard &&other) noexcept
 
auto Lock () noexcept
 
auto Unlock () noexcept
 
void Swap (StickyGuard &other) noexcept
 
- Public Member Functions inherited from yaclib::detail::Guard< M, false >
 Guard () noexcept=default
 
 Guard (Guard &&other) noexcept
 
 Guard (M &m, std::defer_lock_t) noexcept
 
 Guard (M &m, std::try_to_lock_t) noexcept
 
 Guard (M &m, std::adopt_lock_t) noexcept
 
 ~Guard () noexcept
 
Guardoperator= (Guard &&other) noexcept
 
auto Lock () noexcept
 
bool TryLock () noexcept
 
auto Unlock () noexcept
 
auto UnlockOn (IExecutor &e) noexcept
 
void UnlockHere () noexcept
 
void Swap (Guard &other) noexcept
 
M * Release () noexcept
 
M * Mutex () const noexcept
 
bool OwnsLock () const noexcept
 
 operator bool () const noexcept
 

Friends

template<typename >
class detail::GuardStickyAwaiter
 

Additional Inherited Members

- Protected Member Functions inherited from yaclib::detail::GuardState
 GuardState () noexcept=default
 
 GuardState (void *ptr, bool owns) noexcept
 
 GuardState (GuardState &&other) noexcept
 
GuardStateoperator= (GuardState &&other) noexcept
 
void Swap (GuardState &other) noexcept
 
voidPtr () const
 
bool Owns () const noexcept
 
voidLockState () noexcept
 
voidUnlockState () noexcept
 
voidReleaseState () noexcept
 
- Protected Attributes inherited from yaclib::detail::GuardState
std::uintptr_t _state = 0
 

Detailed Description

template<typename M>
class yaclib::StickyGuard< M >

Definition at line 75 of file guard_sticky.hpp.

Member Typedef Documentation

◆ MutexType

template<typename M >
using yaclib::StickyGuard< M >::MutexType = M

Definition at line 79 of file guard_sticky.hpp.

Constructor & Destructor Documentation

◆ StickyGuard()

template<typename M >
yaclib::StickyGuard< M >::StickyGuard ( StickyGuard< M > &&  other)
inlinenoexcept

Definition at line 82 of file guard_sticky.hpp.

References yaclib::MakeContract().

Member Function Documentation

◆ Lock()

template<typename M >
auto yaclib::StickyGuard< M >::Lock ( )
inlinenoexcept

Definition at line 90 of file guard_sticky.hpp.

References yaclib::MakeContract().

◆ operator=()

template<typename M >
StickyGuard & yaclib::StickyGuard< M >::operator= ( StickyGuard< M > &&  other)
inlinenoexcept

Definition at line 85 of file guard_sticky.hpp.

References yaclib::MakeContract().

◆ Swap()

template<typename M >
void yaclib::StickyGuard< M >::Swap ( StickyGuard< M > &  other)
inlinenoexcept

Definition at line 102 of file guard_sticky.hpp.

References yaclib::MakeContract().

◆ Unlock()

template<typename M >
auto yaclib::StickyGuard< M >::Unlock ( )
inlinenoexcept

Definition at line 96 of file guard_sticky.hpp.

References yaclib::MakeContract().

Friends And Related Symbol Documentation

◆ detail::GuardStickyAwaiter

template<typename M >
template<typename >
friend class detail::GuardStickyAwaiter
friend

Definition at line 111 of file guard_sticky.hpp.


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