24 lines
326 B
C++
24 lines
326 B
C++
#include "dl_thread.h"
|
|
|
|
#if DL_PLATFORM == DL_PLATFORM_WIN32
|
|
#include <Windows.h>
|
|
#endif
|
|
|
|
namespace dl
|
|
{
|
|
ThreadManager* g_thread;
|
|
|
|
#if DL_PLATFORM == DL_PLATFORM_WIN32
|
|
void Thread::Terminate()
|
|
{
|
|
TerminateThread(_t.native_handle(), -1);
|
|
_state = 1;
|
|
}
|
|
#endif
|
|
|
|
Thread::~Thread()
|
|
{
|
|
g_thread->_remove_ref(this);
|
|
}
|
|
|
|
} |