📄 thread.h
字号:
// ***************************************************************
// Thread version: 1.0 · date: 06/30/2006
// -------------------------------------------------------------
// Wrapper Thread operation
// -------------------------------------------------------------
// Copyright (C) 2001-2006 - Midapexsoft All Rights Reserved
// ***************************************************************
//
// ***************************************************************
#pragma once
class CThread
{
public:
CThread();
virtual ~CThread();
HANDLE GetHandle() const;
void Wait() const;
bool Wait(DWORD timeoutMillis) const;
void Start();
void Terminate(DWORD exitCode = 0);
void SetPriority(int priority);
unsigned int GetThreadID() const { return m_dwId;}
protected:
//it can be overrided for your purpose
virtual int Run() = 0;
private :
static unsigned int __stdcall ThreadFunction(void *pV);
HANDLE m_hThread;
unsigned int m_dwId;
// No copies
CThread(const CThread &rhs);
CThread &operator=(const CThread &rhs);
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -