Fermat
Public Methods | List of all members
cugar::ScopedLock Class Reference

Detailed description

A scoped lock, to be used to protect a code section enclosed within a scope. e.g.

struct MyThreadSafeClass
{
// multi-thread safe section
void foo()
{
bar();
// enter a critical section
{
ScopedLock(&m_mutex);
... // do something
}
}
private:
Mutex m_mutex;
};

#include <threads.h>

Public Methods

 ScopedLock (Mutex *mutex)
 

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