ClanSoft logo
ClanSoft logo
Entire Class Index Main Class Index Cross Index Global Index

Class CL_MutexSection

Lock a mutex until the end of a scope.
Contained in: global
Derived from: none
Derived by: none
Group: Core (System)

#include <ClanLib/core.h>


public function member index:

Construction:

CL_MutexSection(CL_Mutex* mutex, bool lock_at_construct = true);
virtual ~CL_MutexSection();
void enter();
void leave();
 

Description:

This class is a way to ensure a mutex will be released at the end of a scope. When an instance is constructed, it will lock the mutex, and when the instance is destroyed (at the exit of its scope), it will unlock the mutex.


Function Member Descriptions:

CL_MutexSection::CL_MutexSection - Mutex Section Constructor
CL_MutexSection(CL_Mutex* mutex, bool lock_at_construct = true);


CL_MutexSection::~CL_MutexSection - Mutex Section Destructor
virtual ~CL_MutexSection();



Variable Member Descriptions: