wxThread how to implement multiple wait

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
valiyuneski
Earned a small fee
Earned a small fee
Posts: 14
Joined: Thu Dec 11, 2008 3:01 pm

wxThread how to implement multiple wait

Post by valiyuneski »

Has anybody implemented yet a wxThread with multiple wait of the following form :

void* Entry()
{
while(::WaitForSingleObject(GetEvent(), INFINITE) == WAIT_OBJECT_0)
{
case(xxx):
DoSomething();
brake;
case(yyy):
DoSomethingElse();
break;
case(Exit):
ExitThread();
break;
default:
break;
}
}
valiyuneski
Earned a small fee
Earned a small fee
Posts: 14
Joined: Thu Dec 11, 2008 3:01 pm

Post by valiyuneski »

Sorry for the error

Code: Select all

void* Entry()
{
while(DWORD dwWait = ::WaitForSingleMultipleObjects(...))
{
case(xxx):
DoSomething();
brake;
case(yyy):
DoSomethingElse();
break;
case(Exit):
ExitThread();
break;
default:
break;
}
}
EDIT by Auria : Please use code tags
Post Reply