我的问题是,如果WaitForMultipleObjectsEx最后一个参数指定FALSE的话,使得函数不返回直到超市(If this parameter is FALSE, the function does not return and the completion routine or APC function is not executed)
那么它和直接Sleep(x)又有什么区别呢? 什么情况下我要把最后一个参数指定为FALSE? 这好像是没有意义的事情啊

解决方案 »

  1.   

    BOOL bAlertable是是否可被apc打断等待
      

  2.   

    WaitForMultipleObjectsEx
    Waits until one or all of the specified objects are in the signaled state, an I/O completion routine or asynchronous procedure call (APC) is queued to the thread, or the time-out interval elapses.Sleep
    Suspends the execution of the current thread until the time-out interval elapses.区别还不明显吗?