Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
Sync< CONF >::Lock Class Reference

#include "lib/sync.hpp"

Description

template<class CONF = NonrecursiveLock_NoWait>
class lib::Sync< CONF >::Lock

scoped guard to control the actual locking.

Definition at line 226 of file sync.hpp.

Public Member Functions

template<class X >
 Lock (X *it)
 
 ~Lock ()
 
void notify_one ()
 
void notify_all ()
 
template<class PRED >
void wait (PRED &&predicate)
 
template<class DUR , class PRED >
bool wait_for (DUR const &timeout, PRED &&predicate)
 
template<class X , class PRED >
 Lock (X *it, PRED &&predicate)
 convenience shortcut: Locks and immediately enters wait state on the given predicate
 

Protected Member Functions

 Lock (Monitor &m)
 for creating a ClassLock
 
MonitoraccessMonitor ()
 subclass access to underlying sync primitives
 

Private Attributes

Monitormon_
 

Additional Inherited Members

- Private Member Functions inherited from NonCopyable
 ~NonCopyable ()=default
 
 NonCopyable ()=default
 
 NonCopyable (NonCopyable const &)=delete
 
NonCopyableoperator= (NonCopyable const &)=delete
 

Constructor & Destructor Documentation

◆ Lock() [1/3]

template<class CONF = NonrecursiveLock_NoWait>
template<class X >
Lock ( X *  it)
inline

Definition at line 233 of file sync.hpp.

References Monitor< IMPL >::lock(), and Sync< CONF >::Lock::mon_.

+ Here is the call graph for this function:

◆ ~Lock()

template<class CONF = NonrecursiveLock_NoWait>
~Lock ( )
inline

Definition at line 234 of file sync.hpp.

References Sync< CONF >::Lock::mon_, and Monitor< IMPL >::unlock().

+ Here is the call graph for this function:

◆ Lock() [2/3]

template<class CONF = NonrecursiveLock_NoWait>
template<class X , class PRED >
Lock ( X *  it,
PRED &&  predicate 
)
inline

convenience shortcut: Locks and immediately enters wait state on the given predicate

Definition at line 257 of file sync.hpp.

References Monitor< IMPL >::lock(), Sync< CONF >::Lock::mon_, Monitor< IMPL >::unlock(), and Monitor< IMPL >::wait().

+ Here is the call graph for this function:

◆ Lock() [3/3]

template<class CONF = NonrecursiveLock_NoWait>
Lock ( Monitor m)
inlineprotected

for creating a ClassLock

Definition at line 273 of file sync.hpp.

References Monitor< IMPL >::lock(), and Sync< CONF >::Lock::mon_.

+ Here is the call graph for this function:

Member Function Documentation

◆ notify_one()

template<class CONF = NonrecursiveLock_NoWait>
void notify_one ( )
inline

Definition at line 236 of file sync.hpp.

References Sync< CONF >::Lock::mon_, and Monitor< IMPL >::notify_one().

+ Here is the call graph for this function:

◆ notify_all()

template<class CONF = NonrecursiveLock_NoWait>
void notify_all ( )
inline

Definition at line 237 of file sync.hpp.

References Sync< CONF >::Lock::mon_, and Monitor< IMPL >::notify_all().

Referenced by SyncOnBool::provide().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ wait()

template<class CONF = NonrecursiveLock_NoWait>
template<class PRED >
void wait ( PRED &&  predicate)
inline

Definition at line 241 of file sync.hpp.

References Sync< CONF >::Lock::mon_, and Monitor< IMPL >::wait().

Referenced by MonitorSync::sync().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ wait_for()

template<class CONF = NonrecursiveLock_NoWait>
template<class DUR , class PRED >
bool wait_for ( DUR const &  timeout,
PRED &&  predicate 
)
inline

Definition at line 248 of file sync.hpp.

References Sync< CONF >::Lock::mon_, and Monitor< IMPL >::wait_for().

+ Here is the call graph for this function:

◆ accessMonitor()

template<class CONF = NonrecursiveLock_NoWait>
Monitor & accessMonitor ( )
inlineprotected

subclass access to underlying sync primitives

Definition at line 280 of file sync.hpp.

References Sync< CONF >::Lock::mon_.

Member Data Documentation

◆ mon_

+ Inheritance diagram for Sync< CONF >::Lock:
+ Collaboration diagram for Sync< CONF >::Lock:

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