misc/libphysfs/lzma/CPP/7zip/Common/VirtThread.h
changeset 13881 99b265e0d1d0
parent 13880 5f819b90d479
child 13882 b172a5d40eee
equal deleted inserted replaced
13880:5f819b90d479 13881:99b265e0d1d0
     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