如:其中g_hEventMutex=CreateMutex(NULL,FALSE,"EventMutex")
假如此时线程A正占有互斥量,下面的程序为线程B的程序
//线程B
WaitForSingleObject(g_hEventMutex,5000);
。。。运行代码B
ReleaseMutex(g_hEventMutex); //释放互斥量
在超过5000ms之后g_hEventMutex还是为无信号状态,这时WaitForSingleObject()返回WAIT_TIMEOUT,
在MSDN的解析中看到,返回值:WAIT_TIMEOUT:The time-out interval elapsed, and the object's state is nonsignaled,这是否意味着在线程A中占有的互斥量(g_hEventMutex)直接被系统强制解除了,给线程B的运行代码B运行了?