equal
deleted
inserted
replaced
|
1 // VirtThread.h |
|
2 |
|
3 #ifndef __VIRTTHREAD_H |
|
4 #define __VIRTTHREAD_H |
|
5 |
|
6 #include "../../Windows/Synchronization.h" |
|
7 #include "../../Windows/Thread.h" |
|
8 |
|
9 struct CVirtThread |
|
10 { |
|
11 NWindows::NSynchronization::CAutoResetEvent StartEvent; |
|
12 NWindows::NSynchronization::CAutoResetEvent FinishedEvent; |
|
13 NWindows::CThread Thread; |
|
14 bool ExitEvent; |
|
15 |
|
16 ~CVirtThread(); |
|
17 HRes Create(); |
|
18 void Start(); |
|
19 void WaitFinish() { FinishedEvent.Lock(); } |
|
20 virtual void Execute() = 0; |
|
21 }; |
|
22 |
|
23 #endif |