add RageThread copy ctor, RageEvent::WaitTimeoutSupported
This commit is contained in:
@@ -217,6 +217,13 @@ RageThread::RageThread()
|
|||||||
m_sName = "unnamed";
|
m_sName = "unnamed";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RageThread::RageThread( const RageThread &cpy )
|
||||||
|
{
|
||||||
|
/* Copying a thread does not start the copy. */
|
||||||
|
m_pSlot = NULL;
|
||||||
|
m_sName = cpy.m_sName;
|
||||||
|
}
|
||||||
|
|
||||||
RageThread::~RageThread()
|
RageThread::~RageThread()
|
||||||
{
|
{
|
||||||
if( m_pSlot != NULL )
|
if( m_pSlot != NULL )
|
||||||
@@ -720,6 +727,11 @@ void RageEvent::Broadcast()
|
|||||||
m_pEvent->Broadcast();
|
m_pEvent->Broadcast();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool RageEvent::WaitTimeoutSupported() const
|
||||||
|
{
|
||||||
|
return m_pEvent->WaitTimeoutSupported();
|
||||||
|
}
|
||||||
|
|
||||||
RageSemaphore::RageSemaphore( RString sName, int iInitialValue ):
|
RageSemaphore::RageSemaphore( RString sName, int iInitialValue ):
|
||||||
m_sName( sName )
|
m_sName( sName )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ class RageThread
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RageThread();
|
RageThread();
|
||||||
|
RageThread( const RageThread &cpy );
|
||||||
~RageThread();
|
~RageThread();
|
||||||
|
|
||||||
void SetName( const RString &n ) { m_sName = n; }
|
void SetName( const RString &n ) { m_sName = n; }
|
||||||
@@ -140,6 +141,7 @@ public:
|
|||||||
bool Wait( RageTimer *pTimeout = NULL );
|
bool Wait( RageTimer *pTimeout = NULL );
|
||||||
void Signal();
|
void Signal();
|
||||||
void Broadcast();
|
void Broadcast();
|
||||||
|
bool WaitTimeoutSupported() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
EventImpl *m_pEvent;
|
EventImpl *m_pEvent;
|
||||||
|
|||||||
Reference in New Issue
Block a user