FCT
载入中...
搜索中...
未找到
ToolDefine.h
浏览该文件的文档.
1//
2// Created by Administrator on 2025/3/16.
3//
4
5#ifndef FCT_TOOLDEFINE_H
6#define FCT_TOOLDEFINE_H
7//#define FCT_SAFE_RELEASE(p) if (p) { p->release(); p = nullptr; }
8//#define FCT_SAFE_ADDREF(p) if (p) { p->addRef(); }
9#define FCT_WAIT_FOR(condition) \
10 do { \
11 while(!(condition)) \
12 {\
13 std::this_thread::sleep_for(std::chrono::milliseconds(0)); \
14 }\
15 condition = false;\
16 } while(0)
17#define FCT_WAIT_FOR_WITH_TERM(condition,termCondition) \
18 do { \
19 while(!condition && !(termCondition)) \
20 {\
21 std::this_thread::sleep_for(std::chrono::milliseconds(0)); \
22 }\
23 condition = false;\
24 } while(0)
25#endif //FCT_TOOLDEFINE_H