Mahmoud Eltahawy
2014-04-28 13:19:47 UTC
Hi All,
I have awhile(1) loop in the entry of wxThreadHelper which continuously
reads data from Socket then send an event to Main Gui Thread to update the
GUI,
To increase the performance as possible, I am asking about the min time to
sleep (wxThread::sleep(x)) inside the Entry loop
wxThread::ExitCode AppFrame::Entry()
{
wxThreadEvent evt( wxEVT_THREAD, PROTOCOL_BG_THREAD );
while(1) {
if(!GetThread()->TestDestroy())
break;
/* Read from socket */
wxQueueEvent(this,evt.Clone() );
wxThread::Sleep(...);
}
return (wxThread::ExitCode)0;
}
Thanks
Mahmoud
I have awhile(1) loop in the entry of wxThreadHelper which continuously
reads data from Socket then send an event to Main Gui Thread to update the
GUI,
To increase the performance as possible, I am asking about the min time to
sleep (wxThread::sleep(x)) inside the Entry loop
wxThread::ExitCode AppFrame::Entry()
{
wxThreadEvent evt( wxEVT_THREAD, PROTOCOL_BG_THREAD );
while(1) {
if(!GetThread()->TestDestroy())
break;
/* Read from socket */
wxQueueEvent(this,evt.Clone() );
wxThread::Sleep(...);
}
return (wxThread::ExitCode)0;
}
Thanks
Mahmoud
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users