![]() |
Kodi Documentation 18.0
Kodi is an open source media player and entertainment hub.
|
#include <Event.h>
Public Member Functions | |
CEventGroup (std::initializer_list< CEvent * > events) | |
~CEventGroup () | |
CEvent * | wait () |
CEvent * | wait (unsigned int milliseconds) |
int | getNumWaits () |
Friends | |
class | ::CEvent |
CEventGroup is a means of grouping CEvents to wait on them together. It is equivalent to WaitOnMultipleObject that returns when "any" Event in the group signaled.
XbmcThreads::CEventGroup::CEventGroup | ( | std::initializer_list< CEvent * > | events | ) |
Create a CEventGroup from a number of CEvents.
XbmcThreads::CEventGroup::~CEventGroup | ( | ) |
|
inline |
This is mostly for testing. It allows a thread to make sure there are the right amount of other threads waiting.
CEvent * XbmcThreads::CEventGroup::wait | ( | ) |
This will block until any one of the CEvents in the group are signaled at which point a pointer to that CEvents will be returned.
CEvent * XbmcThreads::CEventGroup::wait | ( | unsigned int | milliseconds | ) |
This will block until any one of the CEvents in the group are signaled or the timeout is reached. If an event is signaled then it will return a pointer to that CEvent, otherwise it will return NULL.
|
friend |