atscppapi  1.0.9
C++ wrapper for Apache Traffic Server API
 All Classes Files Functions Enumerations Enumerator Macros
Public Member Functions | List of all members
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.

Public Member Functions

 ScopedSharedMutexLock (shared_ptr< Mutex > mutex)
 
 ~ScopedSharedMutexLock ()
 

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

Constructor & Destructor Documentation

atscppapi::ScopedSharedMutexLock::ScopedSharedMutexLock ( shared_ptr< Mutex mutex)
inlineexplicit

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

Parameters
mutexa shared pointer to a Mutex.
atscppapi::ScopedSharedMutexLock::~ScopedSharedMutexLock ( )
inline

Unlock the mutex.


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