mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-28 21:38:01 +03:00
This commit is contained in:
parent
de070bf485
commit
a90b5cf37a
1998 changed files with 1034301 additions and 0 deletions
29
Utilities/Thread.cpp
Normal file
29
Utilities/Thread.cpp
Normal file
|
@ -0,0 +1,29 @@
|
|||
#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();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue