Base Framework
Public Member Functions | List of all members
SingleExclusiveSynchronize< GUARD > Class Template Reference

Exclusive synchronization. More...

#include <base/concurrency/SingleExclusiveSynchronize.h>

Public Member Functions

 SingleExclusiveSynchronize (const Guard &_guard)
 
 ~SingleExclusiveSynchronize () noexcept
 

Detailed Description

template<class GUARD>
class SingleExclusiveSynchronize< GUARD >

Exclusive synchronization.

This class is used to synchronize executing contexts exclusively with a guard object of your choice.

See also
SharedSynchronize
Version
1.0

Constructor & Destructor Documentation

◆ SingleExclusiveSynchronize()

template<class GUARD >
SingleExclusiveSynchronize< GUARD >::SingleExclusiveSynchronize ( const Guard &  _guard)
inlineexplicit

Initializes the synchronization object. Raises ConcurrencyException if the guard has already been locked.

Parameters
guardThe synchronize able object to be synchronized.

◆ ~SingleExclusiveSynchronize()

template<class GUARD >
SingleExclusiveSynchronize< GUARD >::~SingleExclusiveSynchronize ( )
inlinenoexcept

Releases the lock if not already released and destroys the synchronization object.