Kodi Documentation 18.0
Kodi is an open source media player and entertainment hub.
XbmcThreads::TightConditionVariable< P > Class Template Reference

#include <Condition.h>

Public Member Functions

 TightConditionVariable (ConditionVariable &cv, P predicate_)
 
template<typename L >
void wait (L &lock)
 
template<typename L >
bool wait (L &lock, unsigned long milliseconds)
 
void notifyAll ()
 
void notify ()
 

Detailed Description

template<typename P>
class XbmcThreads::TightConditionVariable< P >

This is a condition variable along with its predicate. This allows the use of a condition variable without the spurious returns since the state being monitored is also part of the condition.

L should implement the Lockable concept

The requirements on P are that it can act as a predicate (that is, I can use it in an 'while(!predicate){...}' where 'predicate' is of type 'P').

Constructor & Destructor Documentation

◆ TightConditionVariable()

template<typename P >
XbmcThreads::TightConditionVariable< P >::TightConditionVariable ( ConditionVariable cv,
predicate_ 
)
inline

Member Function Documentation

◆ notify()

template<typename P >
void XbmcThreads::TightConditionVariable< P >::notify ( )
inline

◆ notifyAll()

template<typename P >
void XbmcThreads::TightConditionVariable< P >::notifyAll ( )
inline

◆ wait() [1/2]

template<typename P >
template<typename L >
void XbmcThreads::TightConditionVariable< P >::wait ( L &  lock)
inline

◆ wait() [2/2]

template<typename P >
template<typename L >
bool XbmcThreads::TightConditionVariable< P >::wait ( L &  lock,
unsigned long  milliseconds 
)
inline

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