|
WIN32 API 함수인 WaitForMultipleObjects 도움말을 보면 아래와 같은데
이에 따르면, bWaitAll 이 TRUE인 경우에는 반환값이 WAIT_OBJECT_0 부터 (WAIT_OBJECT_0 + nCount - 1) 사이의 어떤 값이든 전달한 핸들의 오브젝트들이 모두 시그널드 상태라고 합니다. 예를 들어, 전달한 핸들이 스레드 핸들들이라면 해당 스레드들이 모두 종료되었음(terminate)을 뜻하는 것이죠.
Return Value: WAIT_OBJECT_0 to (WAIT_OBJECT_0 + nCount - 1)
Meaning: If bWaitAll is TRUE, the return value indicates that the state of all specified objects is signaled.
If bWaitAll is FALSE, the return value minus WAIT_OBJECT_0 indicates the lpHandles array index of the object that satisfied the wait. If more than one object became signalled during the call, this is the array index of the signalled object with the smallest index value of all the signalled objects.
|