diff options
Diffstat (limited to 'CPP/7zip/Common/VirtThread.h')
-rwxr-xr-x | CPP/7zip/Common/VirtThread.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/CPP/7zip/Common/VirtThread.h b/CPP/7zip/Common/VirtThread.h new file mode 100755 index 00000000..62c055b6 --- /dev/null +++ b/CPP/7zip/Common/VirtThread.h @@ -0,0 +1,23 @@ +// VirtThread.h + +#ifndef __VIRTTHREAD_H +#define __VIRTTHREAD_H + +#include "../../Windows/Synchronization.h" +#include "../../Windows/Thread.h" + +struct CVirtThread +{ + NWindows::NSynchronization::CAutoResetEvent StartEvent; + NWindows::NSynchronization::CAutoResetEvent FinishedEvent; + NWindows::CThread Thread; + bool ExitEvent; + + ~CVirtThread(); + HRes Create(); + void Start(); + void WaitFinish() { FinishedEvent.Lock(); } + virtual void Execute() = 0; +}; + +#endif |