Welcome to mirror list, hosted at ThFree Co, Russian Federation.

VirtThread.h « Common « 7zip « CPP - github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 62c055b676b23b58b245e72611c92c33f19894b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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