-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCompleteEvent.h
51 lines (35 loc) · 912 Bytes
/
CompleteEvent.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#pragma once
#include "MemoryUtil.h"
class CompleteEvent
{
public:
CompleteEvent();
~CompleteEvent() = default;
void Init();
BOOL IsDone();
BOOL WaitComplete( DWORD WaitTick );
BOOL Signal();
private:
CompleteEvent( CompleteEvent&& rhs ) = delete;
CompleteEvent( const CompleteEvent& rhs ) = delete;
CompleteEvent& operator=( const CompleteEvent& rhs ) = delete;
CompleteEvent& operator=( CompleteEvent&& rhs ) = delete;
private:
EventHandlePtr m_CompletePtr = NULL;
};
//-----------------------------------------------------------------
class CS
{
public:
CS();
CS( CS&& r );
~CS();
inline CSPtr Obj() { return CSPtr( _cs ); }
private:
CS( const CS& r ) = delete;
CS& operator=( const CS& ) = delete;
private:
BOOL m_bInit = FALSE; // 해당 CS 객체가 초기화가 완료 되었는지 판단 변수
CRITICAL_SECTION _cs;
};
//-----------------------------------------------------------------