Shaka Player Embedded
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
shaka::impl::PendingTask< Func > Class Template Reference

#include <task_runner.h>

Inheritance diagram for shaka::impl::PendingTask< Func >:
shaka::impl::PendingTaskBase

Public Types

using Ret = typename std::result_of< Func()>::type
 

Public Member Functions

 PendingTask (const util::Clock *clock, Func &&callback, const std::string &name, TaskPriority priority, uint64_t delay_ms, int id, bool loop)
 
void Call () override
 
- Public Member Functions inherited from shaka::impl::PendingTaskBase
 PendingTaskBase (const util::Clock *clock, TaskPriority priority, uint64_t delay_ms, int id, bool loop)
 
virtual ~PendingTaskBase ()
 

Public Attributes

std::decay< Func >::type callback
 
std::shared_ptr< ThreadEvent< Ret > > event
 
- Public Attributes inherited from shaka::impl::PendingTaskBase
uint64_t start_ms
 
const uint64_t delay_ms
 
const TaskPriority priority
 
const int id
 
const bool loop
 
std::atomic< bool > should_remove
 

Detailed Description

template<typename Func>
class shaka::impl::PendingTask< Func >

The implementation of a pending task. This stores a copy of the object that will be called. This will also trace the object so it remains alive. For example, this ensures that a BackingObject remains alive until an event is raised.

Definition at line 82 of file task_runner.h.

Member Typedef Documentation

§ Ret

template<typename Func>
using shaka::impl::PendingTask< Func >::Ret = typename std::result_of<Func()>::type

Definition at line 87 of file task_runner.h.

Constructor & Destructor Documentation

§ PendingTask()

template<typename Func>
shaka::impl::PendingTask< Func >::PendingTask ( const util::Clock clock,
Func &&  callback,
const std::string &  name,
TaskPriority  priority,
uint64_t  delay_ms,
int  id,
bool  loop 
)
inline

Definition at line 89 of file task_runner.h.

Member Function Documentation

§ Call()

template<typename Func>
void shaka::impl::PendingTask< Func >::Call ( )
inlineoverridevirtual

Performs the task.

Implements shaka::impl::PendingTaskBase.

Definition at line 96 of file task_runner.h.

Member Data Documentation

§ callback

template<typename Func>
std::decay<Func>::type shaka::impl::PendingTask< Func >::callback

Definition at line 109 of file task_runner.h.

§ event

template<typename Func>
std::shared_ptr<ThreadEvent<Ret> > shaka::impl::PendingTask< Func >::event

Definition at line 110 of file task_runner.h.


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