This commit is contained in:
Igor Pavlov
2009-02-03 00:00:00 +00:00
committed by Kornel Lesiński
parent 1dc92281fa
commit 8874e4fbc9
34 changed files with 216 additions and 148 deletions

View File

@@ -25,6 +25,9 @@ public:
WRes Wait() { return Thread_Wait(&thread); }
#ifdef _WIN32
operator HANDLE() { return thread.handle; }
void Attach(HANDLE handle) { thread.handle = handle; }
HANDLE Detach() { HANDLE h = thread.handle; thread.handle = NULL; return h; }
DWORD Resume() { return ::ResumeThread(thread.handle); }
DWORD Suspend() { return ::SuspendThread(thread.handle); }
bool Terminate(DWORD exitCode) { return BOOLToBool(::TerminateThread(thread.handle, exitCode)); }