📄 mutex.h
字号:
#ifndef _MUTEX_H_INCLUDE_
#define _MUTEX_H_INCLUDE_
#ifndef WIN32
#include <pthread.h>
#endif
class Mutex
{
friend class MutexApply;
public:
Mutex();
virtual ~Mutex();
public:
#ifndef WIN32
operator pthread_mutex_t&();
#endif
protected:
bool Lock();
bool Unlock();
private:
#ifndef WIN32
pthread_mutex_t mutex_;
#endif
};
class MutexApply
{
public:
MutexApply(Mutex& mutex);
virtual ~MutexApply();
protected:
private:
Mutex mutex_;
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -