[Project64] Add trace if deleting thread object in thread
This commit is contained in:
parent
c8cd2914a6
commit
beada98cf5
|
@ -22,6 +22,10 @@ CThread::CThread(CTHREAD_START_ROUTINE lpStartAddress) :
|
||||||
CThread::~CThread()
|
CThread::~CThread()
|
||||||
{
|
{
|
||||||
WriteTrace(TraceThread, TraceDebug, "Start");
|
WriteTrace(TraceThread, TraceDebug, "Start");
|
||||||
|
if (CThread::GetCurrentThreadId() == m_threadID)
|
||||||
|
{
|
||||||
|
WriteTrace(TraceThread, TraceError, "Deleting from thread!!!");
|
||||||
|
}
|
||||||
if (CThread::GetCurrentThreadId() != m_threadID && isRunning())
|
if (CThread::GetCurrentThreadId() != m_threadID && isRunning())
|
||||||
{
|
{
|
||||||
Terminate();
|
Terminate();
|
||||||
|
@ -119,7 +123,7 @@ void CThread::Terminate(void)
|
||||||
WriteTrace(TraceThread, TraceDebug, "Terminating thread");
|
WriteTrace(TraceThread, TraceDebug, "Terminating thread");
|
||||||
TerminateThread(m_thread, 0);
|
TerminateThread(m_thread, 0);
|
||||||
#else
|
#else
|
||||||
WriteTrace(TraceThread, TraceError, "Need to fix");
|
WriteTrace(TraceThread, TraceError, "Need to fix");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
WriteTrace(TraceThread, TraceDebug, "Done");
|
WriteTrace(TraceThread, TraceDebug, "Done");
|
||||||
|
|
Loading…
Reference in New Issue