mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-18 00:05:45 -04:00
Common/Event: Add unit tests
This commit is contained in:
@ -50,7 +50,7 @@ void Event::Reset()
|
||||
ResetEvent(reinterpret_cast<HANDLE>(m_event_handle));
|
||||
}
|
||||
|
||||
void Event::WaitForMultipleEvents(Event** events, u32 num_events)
|
||||
void Event::WaitForMultiple(Event** events, u32 num_events)
|
||||
{
|
||||
DebugAssert(num_events > 0);
|
||||
|
||||
@ -120,7 +120,7 @@ void Event::Reset()
|
||||
;
|
||||
}
|
||||
|
||||
void Event::WaitForMultipleEvents(Event** events, u32 num_events)
|
||||
void Event::WaitForMultiple(Event** events, u32 num_events)
|
||||
{
|
||||
DebugAssert(num_events > 0);
|
||||
|
||||
@ -130,6 +130,9 @@ void Event::WaitForMultipleEvents(Event** events, u32 num_events)
|
||||
{
|
||||
pd.fd = events[i]->m_pipe_fds[0];
|
||||
poll(&pd, 1, -1);
|
||||
|
||||
if (events[i]->m_auto_reset)
|
||||
events[i]->Reset();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,7 @@ public:
|
||||
void Wait();
|
||||
bool TryWait(u32 timeout_in_ms);
|
||||
|
||||
static void WaitForMultipleEvents(Event** events, u32 num_events);
|
||||
static void WaitForMultiple(Event** events, u32 num_events);
|
||||
|
||||
private:
|
||||
#ifdef WIN32
|
||||
|
Reference in New Issue
Block a user