Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
CEvent Class Reference

This is an Event class built from a ConditionVariable. The Event adds the state that the condition is gating as well as the mutex/lock. More...

#include <Event.h>

Inheritance diagram for CEvent:
CDVDMediaCodecOnFrameAvailable

Public Member Functions

 CEvent (bool manual=false, bool signaled_=false)
 
void Reset ()
 
void Set ()
 
bool Signaled ()
 Returns true if Event has been triggered and not reset, false otherwise.
 
template<typename Rep , typename Period >
bool Wait (std::chrono::duration< Rep, Period > duration)
 This will wait up to 'duration' for the Event to be triggered. The method will return 'true' if the Event was triggered. Otherwise it will return false.
 
bool Wait ()
 This will wait for the Event to be triggered. The method will return 'true' if the Event was triggered. If it was either interrupted it will return false. Otherwise it will return false.
 
int getNumWaits ()
 This is mostly for testing. It allows a thread to make sure there are the right amount of other threads waiting.
 

Friends

class XbmcThreads::CEventGroup
 

Detailed Description

This is an Event class built from a ConditionVariable. The Event adds the state that the condition is gating as well as the mutex/lock.

This Event can be 'interruptible' (even though there is only a single place in the code that uses this behavior).

This class manages 'spurious returns' from the condition variable.

Constructor & Destructor Documentation

◆ CEvent()

CEvent::CEvent ( bool manual = false,
bool signaled_ = false )
inline

Member Function Documentation

◆ getNumWaits()

int CEvent::getNumWaits ( )
inline

This is mostly for testing. It allows a thread to make sure there are the right amount of other threads waiting.

◆ Reset()

void CEvent::Reset ( )
inline

◆ Set()

void CEvent::Set ( )

◆ Signaled()

bool CEvent::Signaled ( )
inline

Returns true if Event has been triggered and not reset, false otherwise.

◆ Wait() [1/2]

bool CEvent::Wait ( )
inline

This will wait for the Event to be triggered. The method will return 'true' if the Event was triggered. If it was either interrupted it will return false. Otherwise it will return false.

◆ Wait() [2/2]

template<typename Rep , typename Period >
bool CEvent::Wait ( std::chrono::duration< Rep, Period > duration)
inline

This will wait up to 'duration' for the Event to be triggered. The method will return 'true' if the Event was triggered. Otherwise it will return false.

Friends And Related Symbol Documentation

◆ XbmcThreads::CEventGroup

friend class XbmcThreads::CEventGroup
friend

The documentation for this class was generated from the following files: