mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 10:42:36 +01:00
29 lines
444 B
C++
29 lines
444 B
C++
#include "stdafx.h"
|
|
#include "Thread.h"
|
|
|
|
void ThreadBase::Start()
|
|
{
|
|
if(m_executor) return;
|
|
|
|
m_executor = new ThreadExec(m_detached, this);
|
|
}
|
|
|
|
void ThreadBase::Stop(bool wait)
|
|
{
|
|
if(!m_executor) return;
|
|
ThreadExec* exec = m_executor;
|
|
m_executor = nullptr;
|
|
exec->Stop(wait);
|
|
}
|
|
|
|
bool ThreadBase::IsAlive()
|
|
{
|
|
return m_executor != nullptr;
|
|
}
|
|
|
|
bool ThreadBase::TestDestroy()
|
|
{
|
|
if(!m_executor) return true;
|
|
|
|
return m_executor->TestDestroy();
|
|
} |