CsLibGuarded  1.4.1
libguarded::ordered_guarded< T, M > Class Template Reference

#include <CsLibGuarded/ordered_guarded.h>

Public Member Functions

template<typename... Us>
 ordered_guarded (Us &&... data)
 

Detailed Description

template<typename T, typename M = std::shared_timed_mutex>
class libguarded::ordered_guarded< T, M >

This templated class wraps an object. The protected object may be read by any number of threads simultaneously, but only one thread may modify the object at a time.

This class will use std::shared_timed_mutex for the internal locking mechanism by default. In C++17, the class std::shared_mutex is available as well.

The handle returned by the various lock methods is moveable but not copyable.

Definition at line 44 of file cs_ordered_guarded.h.

Constructor & Destructor Documentation

template<typename T, typename M = std::shared_timed_mutex>
template<typename... Us>
libguarded::ordered_guarded< T, M >::ordered_guarded ( Us &&...   data)

Construct a guarded object. This constructor will accept any number of parameters, all of which are forwarded to the constructor of T.

Definition at line 57 of file cs_ordered_guarded.h.


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