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.
More...
#include <Event.h>
|
| CEventGroup (std::initializer_list< CEvent * > events) |
| Create a CEventGroup from a number of CEvents.
|
|
| ~CEventGroup () |
|
CEvent * | 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.
|
|
template<typename Rep , typename Period > |
CEvent * | wait (std::chrono::duration< Rep, Period > duration) |
| locking is ALWAYS done in this order: CEvent::groupListMutex -> CEventGroup::mutex -> CEvent::mutex
|
|
int | getNumWaits () |
| This is mostly for testing. It allows a thread to make sure there are the right amount of other threads waiting.
|
|
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.
◆ CEventGroup()
XbmcThreads::CEventGroup::CEventGroup |
( |
std::initializer_list< CEvent * > | events | ) |
|
◆ ~CEventGroup()
XbmcThreads::CEventGroup::~CEventGroup |
( |
| ) |
|
◆ getNumWaits()
int XbmcThreads::CEventGroup::getNumWaits |
( |
| ) |
|
|
inline |
This is mostly for testing. It allows a thread to make sure there are the right amount of other threads waiting.
◆ wait() [1/2]
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.
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.
◆ wait() [2/2]
template<typename Rep , typename Period >
CEvent * XbmcThreads::CEventGroup::wait |
( |
std::chrono::duration< Rep, Period > | duration | ) |
|
|
inline |
locking is ALWAYS done in this order: CEvent::groupListMutex -> CEventGroup::mutex -> CEvent::mutex
Notice that this method doesn't grab the CEvent::groupListMutex at all. This is fine. It just grabs the CEventGroup::mutex and THEN the individual
◆ ::CEvent
The documentation for this class was generated from the following files: