Shaka Player Embedded
Public Member Functions | List of all members
shaka::ThreadEventBase Class Reference

#include <thread_event.h>

Inheritance diagram for shaka::ThreadEventBase:
shaka::Waitable shaka::ThreadEvent< T > shaka::ThreadEvent< void >

Public Member Functions

 ThreadEventBase (const std::string &name)
 
 ~ThreadEventBase () override
 
std::thread::id GetProvider () const override
 
void SetProvider (Thread *thread)
 
- Public Member Functions inherited from shaka::Waitable
 Waitable (const std::string &name)
 
virtual ~Waitable ()
 
std::string name () const
 

Detailed Description

A non-templated base class of ThreadEvent. This exists to allow generic handling of waiting for events independent of the type of the data.

Definition at line 37 of file thread_event.h.

Constructor & Destructor Documentation

§ ThreadEventBase()

shaka::ThreadEventBase::ThreadEventBase ( const std::string &  name)
explicit

Definition at line 21 of file thread_event.cc.

§ ~ThreadEventBase()

shaka::ThreadEventBase::~ThreadEventBase ( )
override

Definition at line 24 of file thread_event.cc.

Member Function Documentation

§ GetProvider()

std::thread::id shaka::ThreadEventBase::GetProvider ( ) const
overridevirtual
Returns
The thread providing this event, or nullptr if not set yet.

Implements shaka::Waitable.

Definition at line 26 of file thread_event.cc.

§ SetProvider()

void shaka::ThreadEventBase::SetProvider ( Thread thread)
inline

Sets which thread will be providing this event. This must be called exactly once.

Definition at line 49 of file thread_event.h.


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