misc/libphysfs/lzma/CPP/7zip/Common/VirtThread.h
author nemo
Sun, 30 Jul 2017 19:06:57 -0400
changeset 12444 832b969ea00c
parent 12213 bb5522e88ab2
permissions -rw-r--r--
while we're tweaking this phrase, "with" feels awkward

// 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