Pyrogenesis  trunk
Public Member Functions | Protected Attributes | Static Private Attributes | List of all members
PackagedTask< ResultType > Class Template Reference

Corresponds somewhat to std::packaged_task. More...

#include <Future.h>

Public Member Functions

 PackagedTask ()=delete
 
 PackagedTask (std::shared_ptr< typename Future< ResultType >::SharedState > ss)
 
void operator() ()
 
void Cancel ()
 

Protected Attributes

std::shared_ptr< typename Future< ResultType >::SharedState > m_SharedState
 

Static Private Attributes

static constexpr bool VoidResult = std::is_same_v<ResultType, void>
 

Detailed Description

template<typename ResultType>
class PackagedTask< ResultType >

Corresponds somewhat to std::packaged_task.

Like packaged_task, this holds a function acting as a promise. This type is mostly just the shared state and the call operator, handling the promise & continuation logic.

Constructor & Destructor Documentation

◆ PackagedTask() [1/2]

template<typename ResultType>
PackagedTask< ResultType >::PackagedTask ( )
delete

◆ PackagedTask() [2/2]

template<typename ResultType>
PackagedTask< ResultType >::PackagedTask ( std::shared_ptr< typename Future< ResultType >::SharedState >  ss)
inline

Member Function Documentation

◆ Cancel()

template<typename ResultType>
void PackagedTask< ResultType >::Cancel ( )
inline

◆ operator()()

template<typename ResultType>
void PackagedTask< ResultType >::operator() ( )
inline

Member Data Documentation

◆ m_SharedState

template<typename ResultType>
std::shared_ptr<typename Future<ResultType>::SharedState> PackagedTask< ResultType >::m_SharedState
protected

◆ VoidResult

template<typename ResultType>
constexpr bool PackagedTask< ResultType >::VoidResult = std::is_same_v<ResultType, void>
staticprivate

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