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