Does WaitForSingleObject()
with timeout = 0 ms result in thread context switch immediately and the thread to loose its remaining timeslice?
views:
329answers:
2
A:
If the handle is signaled it does not enter a waite state ever. And if the dwMilliseconds parameter is 0 it will not enter the wait state even if it is not signaled.
Regarding its second param: dwMilliseconds MSDN says the following:
... if dwMilliseconds is zero, the function does not enter a wait state if the object is not signaled; it always returns immediately...
Brian R. Bondy
2009-04-02 12:05:27
+2
A:
The documentation says otherwise. MSDN: WatiForSingleObject:
If dwMilliseconds is zero, the function does not enter a wait state if the object is not signaled; it always returns immediately.
Timbo
2009-04-02 12:07:39