Cory McWilliams
7c6a377c0b
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3157 ed5197a5-7fde-0310-b194-c3ffbd925b24
27 lines
260 B
C++
27 lines
260 B
C++
#ifndef INCLUDED_Mutex
|
|
#define INCLUDED_Mutex
|
|
|
|
#include <uv.h>
|
|
|
|
class Mutex {
|
|
public:
|
|
Mutex();
|
|
~Mutex();
|
|
|
|
void lock();
|
|
void unlock();
|
|
|
|
private:
|
|
uv_mutex_t _mutex;
|
|
};
|
|
|
|
class Lock {
|
|
public:
|
|
Lock(Mutex& mutex);
|
|
~Lock();
|
|
private:
|
|
Mutex& _mutex;
|
|
};
|
|
|
|
#endif
|