mFrame
載入中...
搜尋中...
無符合項目
CompletionWaiter.h
1
7#ifndef MFRAME_C86F5223_D663_4D7A_9C3D_8AD153DA0E4D
8#define MFRAME_C86F5223_D663_4D7A_9C3D_8AD153DA0E4D
9
10/* ***************************************************************************************
11 * Include
12 */
13
14//----------------------------------------------------------------------------------------
15
16//----------------------------------------------------------------------------------------
17#include "./../lang/Flushable.h"
18#include "./../lang/Object.h"
19#include "./../sys/Thread.h"
20
21/* ***************************************************************************************
22 * Namespace
23 */
24namespace ufm::util {
25 class CompletionWaiter;
26} // namespace ufm::util
27
28/* ***************************************************************************************
29 * Class/Interface/Struct/Enum
30 */
31
207 /* *************************************************************************************
208 * Variable
209 */
210 private:
212 ufm::sys::Thread* mThread;
213
214 /* *************************************************************************************
215 * Abstract Method
216 */
217
218 /* *************************************************************************************
219 * Construct Method
220 */
221 public:
228
234 virtual ~CompletionWaiter(void) override;
235
236 /* *************************************************************************************
237 * Operator Method
238 */
239
240 /* *************************************************************************************
241 * Override Method
242 */
243
244 /* *************************************************************************************
245 * Public Method
246 */
247 public:
256 bool waitDone(int timeout);
257
265 inline bool waitDone(void) {
266 return this->waitDone(0);
267 }
268
269 /* *************************************************************************************
270 * Protected Method
271 */
272 protected:
279 void notify(void);
280
281 /* *************************************************************************************
282 * Private Method
283 */
284
285 /* *************************************************************************************
286 * Static Variable
287 */
288
289 /* *************************************************************************************
290 * Static Method
291 */
292};
293
294/* ***************************************************************************************
295 * End of file
296 */
297
298#endif /* MFRAME_C86F5223_D663_4D7A_9C3D_8AD153DA0E4D */
物件基底類別
Definition Object.h:63
執行緒類別
Definition Thread.h:49
完成等待器,提供異步操作的同步等待機制。
Definition CompletionWaiter.h:206
bool waitDone(int timeout)
等待操作完成(含超時控制)
virtual ~CompletionWaiter(void) override
解構完成等待器物件
bool waitDone(void)
等待操作完成(無超時限制)
Definition CompletionWaiter.h:265
void notify(void)
通知等待完成
CompletionWaiter(void)
建構完成等待器物件
Definition Iterable.h:28