linux下如何实现 类似Windows的WaitForMultipleObjects函数的功能
代码如下:
HANDLE handles[2] = {m_quitEvent.GetHandle(), m_semaphore.GetHandle()};
UInt32 uWait = WaitForMultipleObjects(2, handles, False, MAX_TIMEOUT);
if(uWait - WAIT_OBJECT_0 == 0)
{
//退出信号
break;
}
Linux代码如何实现呢?
[解决办法]
sig_wait可以不?