view src/win32/7zip/7z/CPP/7zip/Common/VirtThread.h @ 1:f9f4f1b99eed

importing src directory
author Robert McIntyre <rlm@mit.edu>
date Sat, 03 Mar 2012 10:31:27 -0600
parents
children
line wrap: on
line source
1 // VirtThread.h
3 #ifndef __VIRTTHREAD_H
4 #define __VIRTTHREAD_H
6 #include "../../Windows/Synchronization.h"
7 #include "../../Windows/Thread.h"
9 struct CVirtThread
10 {
11 NWindows::NSynchronization::CAutoResetEvent StartEvent;
12 NWindows::NSynchronization::CAutoResetEvent FinishedEvent;
13 NWindows::CThread Thread;
14 bool ExitEvent;
16 ~CVirtThread();
17 WRes Create();
18 void Start();
19 void WaitFinish() { FinishedEvent.Lock(); }
20 virtual void Execute() = 0;
21 };
23 #endif