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::ScopedMutexLock Class Reference

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

#include "Mutex.h"

Inherits atscppapi::noncopyable.

Public Member Functions

 ScopedMutexLock (Mutex &mutex)
 
 ~ScopedMutexLock ()
 

Detailed Description

Take a Mutex reference 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::ScopedMutexLock::ScopedMutexLock ( Mutex mutex)
inlineexplicit

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

Parameters
mutexa reference to a Mutex.
atscppapi::ScopedMutexLock::~ScopedMutexLock ( )
inline

Unlock the mutex.


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