Signalling event

Main thread
{

//Create an eventin the non signalled mode and wait for it
HANDLE g_Event =CreateEvent(0,0,0,0);

//this method will wait till the event is Signalled
WaitForSingleObject(g_Event,INFINITE) ;

}

In another thread

{
//Set the event to signelled state, so that waitforsingle object can return
SetEvent(g_Event)
}

Comments

alexcpn said…
Note- The ResetEvent function sets the specified event object to the nonsignaled state.

Popular posts from this blog

Long running Java process resource consumption monitoring , leak detection and GC tuning

Best practises - Selenium WebDriver/ Java

Java Script Development Guidlines