11 struct Thread::Private
19 Private(): handle(0) { }
22 static DWORD WINAPI main_wrapper(void *t)
23 { reinterpret_cast<Thread *>(t)->main(); return 0; }
25 static void *main_wrapper(void *t)
26 { reinterpret_cast<Thread *>(t)->main(); return 0; }
47 Waits for the thread to exit. Calling this from the thread will cause a
56 WaitForSingleObject(priv_->handle, INFINITE);
58 pthread_join(priv_->handle, 0);
64 Violently terminates the thread.
69 TerminateThread(priv_->handle, 0);
71 pthread_kill(priv_->handle, SIGKILL);
81 DWORD dummy; // Win9x needs the lpTthreadId parameter
82 priv_->handle = CreateThread(0, 0, &Private::main_wrapper, this, 0, &dummy);
84 pthread_create(&priv_->handle, 0, &Private::main_wrapper, this);