add RageThread copy ctor, RageEvent::WaitTimeoutSupported

This commit is contained in:
Glenn Maynard
2006-12-22 11:34:37 +00:00
parent b97d527d02
commit 09ef507084
2 changed files with 14 additions and 0 deletions
+12
View File
@@ -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 )
{
+2
View File
@@ -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;