fairness  v1.0.0
A collection of advanced syncronization mechanisms.
Loading...
Searching...
No Matches
shared_lock.hpp File Reference
#include <boost/fairness/priority_t.hpp>
#include <boost/fairness/acquisition_modes.hpp>
#include <stdexcept>
#include <system_error>
#include <memory>
#include <chrono>
Include dependency graph for shared_lock.hpp:

Go to the source code of this file.

Classes

class  boost::fairness::shared_lock< Lockable >
 The class shared_lock is a general-purpose shared mutex ownership wrapper allowing deferred locking, timed locking and transfer of lock ownership. Locking a shared_lock locks the associated shared mutex in shared mode (to lock it in exclusive mode, std::unique_lock can be used).
The shared_lock class is movable, but not copyable – it meets the requirements of MoveConstructible and MoveAssignable but not of CopyConstructible or CopyAssignable.
shared_lock meets the Lockable requirements. If Lockable meets the SharedTimedLockable requirements, shared_lock also meets TimedLockable requirements.
In order to wait in a shared mutex in shared ownership mode, std::condition_variable_any can be used (std::condition_variable requires std::unique_lock and so can only wait in unique ownership mode). More...
 

Namespaces

namespace  boost
 
namespace  boost::fairness
 

Functions

template<typename Lockable >
void boost::fairness::swap (shared_lock< Lockable > &lhs, shared_lock< Lockable > &rhs) noexcept