SurgSim::Framework::ThreadPool::Task< R > Class Template Reference

Actual tasks, with typed return type. More...

`#include <SurgSim/Framework/ThreadPool-inl.h>`

Inheritance diagram for SurgSim::Framework::ThreadPool::Task< R >:

## Public Member Functions

| Task (std::function< R()> function)
void | execute () override
std::future< R > | getFuture ()
Public Member Functions inherited from SurgSim::Framework::ThreadPool::TaskBase
virtual | ~TaskBase ()

## Private Attributes

std::packaged_task< R()> | m_task

## Detailed Description

### template<class R>
class SurgSim::Framework::ThreadPool::Task< R >

Actual tasks, with typed return type.

## Constructor & Destructor Documentation

## Task()

template<class R >

SurgSim::Framework::ThreadPool::Task< R >::Task | ( | std::function< R()> | function | ) |

inline explicit

## Member Function Documentation

## execute()

template<class R >

void SurgSim::Framework::ThreadPool::Task< R >::execute | ( |  | ) |

inline override virtual

Implements SurgSim::Framework::ThreadPool::TaskBase.

## getFuture()

template<class R >

std::future<R> SurgSim::Framework::ThreadPool::Task< R >::getFuture | ( |  | ) |

inline

## Member Data Documentation

## m_task

template<class R >

std::packaged_task<R()> SurgSim::Framework::ThreadPool::Task< R >::m_task

private

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

- SurgSim/Framework/ThreadPool-inl.h