📄 wycond.h
字号:
/* Copyright is licensed under GNU LGPL. by I.J.Wang 2003 WyCond is for the thread to suspend execution waiting to resume*/#ifndef WYCOND_H__#define WYCOND_H__#define WYCOND_VERSION 31#include "wymutex.h"#include "wytimespec.h"#include <signal.h> // for sig_atomic_tclass WyCond { public: static const char class_name[]; WY_THROW_REPLY; WyCond() WY__TSPC(); ~WyCond() WY__TSPC(); void signal(void) WY__TSPC(); void broadcast(void) WY__TSPC(); WyRet wait(WyLock &mtx); WyRet wait(WyLock &mtx, WyTimeSpec abstime); private: #ifndef NDEBUG volatile sig_atomic_t _sig; // class signature #endif ::pthread_cond_t _cond; WyCond(const WyCond&); // no copy constructor const WyCond& operator =(const WyCond&); // no assign operator bool operator ==(const WyCond&); // no equal operator};#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -