OpenTTD
Public Member Functions | Private Member Functions | Private Attributes
ThreadMutexLocker Class Reference

Simple mutex locker to keep a mutex locked until the locker goes out of scope. More...

#include <thread.h>

Public Member Functions

 ThreadMutexLocker (ThreadMutex *mutex)
 Lock the mutex and keep it locked for the life time of this object.
 ~ThreadMutexLocker ()
 Unlock the mutex.

Private Member Functions

 ThreadMutexLocker (const ThreadMutexLocker &)
ThreadMutexLockeroperator= (const ThreadMutexLocker &)

Private Attributes

ThreadMutexmutex

Detailed Description

Simple mutex locker to keep a mutex locked until the locker goes out of scope.

Definition at line 101 of file thread.h.

Constructor & Destructor Documentation

ThreadMutexLocker::ThreadMutexLocker ( ThreadMutex mutex)
inline

Lock the mutex and keep it locked for the life time of this object.

Parameters
mutexMutex to be locked.

Definition at line 107 of file thread.h.

References ThreadMutex::BeginCritical().


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