WaitForSingleObject(S_InputMutex, INFINITE);
g_pInputQueue->pop();
ReleaseSemaphore(S_InputMutex, 1, NULL);
g_pInputQueue->pop();
ReleaseSemaphore(S_InputMutex, 1, NULL);
WaitForSingleObject(S_InputMutex, INFINITE);
g_pInputQueue->push
ReleaseSemaphore(S_InputMutex, 1, NULL);