25#ifndef __JOIN_MUTEX_HPP__
26#define __JOIN_MUTEX_HPP__
78 void lock () noexcept;
95 pthread_mutex_t*
handle () noexcept;
99 pthread_mutex_t _handle;
147 void lock () noexcept;
164 pthread_mutex_t*
handle () noexcept;
168 pthread_mutex_t _handle;
216 void lock () noexcept;
233 pthread_mutex_t*
handle () noexcept;
237 pthread_mutex_t _handle;
243 template <typename Lockable>
class used to protect shared data from being simultaneously accessed by multiple threads.
Definition mutex.hpp:37
Mutex(Mutex &&other)=delete
move constructor.
pthread_mutex_t * handle() noexcept
get native handle.
Definition mutex.cpp:90
Mutex()
default constructor.
Definition mutex.cpp:42
void unlock() noexcept
unlock the mutex.
Definition mutex.cpp:81
Mutex & operator=(const Mutex &other)=delete
copy assignment.
bool tryLock() noexcept
lock the mutex or return immediatly if the mutex is already locked.
Definition mutex.cpp:72
void lock() noexcept
lock the mutex.
Definition mutex.cpp:63
~Mutex()
destroys the mutex object.
Definition mutex.cpp:54
Mutex(const Mutex &other)=delete
copy constructor.
class used to protect shared data from being simultaneously accessed by multiple threads.
Definition mutex.hpp:106
RecursiveMutex(const Mutex &other)=delete
copy constructor.
RecursiveMutex(RecursiveMutex &&other)=delete
move constructor.
class owning a mutex for the duration of a scoped block.
Definition mutex.hpp:245
ScopedLock()=delete
default constructor.
Lockable * mutex() const
get associated mutex.
Definition mutex.hpp:300
ScopedLock(const ScopedLock &other)=delete
copy constructor.
ScopedLock(ScopedLock &&other)=delete
move constructor.
~ScopedLock()
releases the ownership of the owned mutex.
Definition mutex.hpp:291
ScopedLock(Lockable &mutex)
acquires ownership of the given mutex.
Definition mutex.hpp:256
class used to protect shared data from being simultaneously accessed by multiple process via a shared...
Definition mutex.hpp:175
SharedMutex(const SharedMutex &other)=delete
copy constructor.
SharedMutex(SharedMutex &&other)=delete
move constructor.
Definition acceptor.hpp:32