| 20 | using namespace soar_thread ; |
| 21 | |
| 22 | void ThreadStartFunction(void* pThreadObject) |
| 23 | { |
| 24 | Thread* pThread = static_cast<Thread*>(pThreadObject); |
| 25 | pThread->Run() ; |
| 26 | |
| 27 | // When Run() terminates this "ThreadStartFunction" will terminate |
| 28 | // which will cause the thread itself to terminate. |
| 29 | // At least, that works for Windows. If it fails on Linux we'll |
| 30 | // need an explicit "End" method. |
| 31 | pThread->SetStopped(true) ; |
| 32 | } |
| 33 | |
| 34 | Thread::Thread() |
| 35 | { |