add a wxEventType argument to wxThreadEvent for coherency with other event classes; rewrite its Clone() function

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58661 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Francesco Montorsi
2009-02-04 19:44:55 +00:00
parent 1e247d6992
commit 74d60f66ee
3 changed files with 14 additions and 16 deletions

View File

@@ -292,7 +292,7 @@ void MyWorkerThread::OnExit()
{
}
#define TEST_YIELD_RACE_CONDITION 1
#define TEST_YIELD_RACE_CONDITION 0
void *MyWorkerThread::Entry()
{
@@ -300,7 +300,7 @@ void *MyWorkerThread::Entry()
if ( TestDestroy() )
return NULL;
wxThreadEvent event( WORKER_EVENT );
wxThreadEvent event( wxEVT_COMMAND_THREAD, WORKER_EVENT );
event.SetInt( 50 );
wxQueueEvent( m_frame, new wxThreadEvent(event) );
@@ -315,7 +315,7 @@ void *MyWorkerThread::Entry()
break;
// create any type of command event here
wxThreadEvent event( WORKER_EVENT );
wxThreadEvent event( wxEVT_COMMAND_THREAD, WORKER_EVENT );
event.SetInt( m_count );
// send in a thread-safe way
@@ -324,7 +324,7 @@ void *MyWorkerThread::Entry()
wxMilliSleep(200);
}
wxThreadEvent event( WORKER_EVENT );
wxThreadEvent event( wxEVT_COMMAND_THREAD, WORKER_EVENT );
event.SetInt(-1); // that's all
wxQueueEvent( m_frame, new wxThreadEvent(event) );
#endif