Public Member Functions

atscppapi::ScopedSharedMutexLock Class Reference

Take a shared_ptr to a Mutex and lock inside a scope and unlock when the scope is exited. More...

#include <Mutex.h>

Inherits atscppapi::noncopyable.

Collaboration diagram for atscppapi::ScopedSharedMutexLock:
Collaboration graph
[legend]

Public Member Functions

 ScopedSharedMutexLock (shared_ptr< Mutex > mutex)
 Create the scoped mutex lock, once this object is constructed the lock will be held by the thread.
 ~ScopedSharedMutexLock ()
 Unlock the mutex.

Detailed Description

Take a shared_ptr to a Mutex and lock inside a scope and unlock when the scope is exited.

This is an RAII implementation which will lock a mutex at the start of the scope and unlock it when the scope is exited.

See also:
Mutex

Definition at line 148 of file Mutex.h.


Constructor & Destructor Documentation

atscppapi::ScopedSharedMutexLock::ScopedSharedMutexLock ( shared_ptr< Mutex mutex  )  [inline, explicit]

Create the scoped mutex lock, once this object is constructed the lock will be held by the thread.

Parameters:
mutex a shared pointer to a Mutex.

Definition at line 154 of file Mutex.h.

atscppapi::ScopedSharedMutexLock::~ScopedSharedMutexLock (  )  [inline]

Unlock the mutex.

Definition at line 162 of file Mutex.h.


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