ModErn Text Analysis
META Enumerates Textual Applications
Public Member Functions | Public Attributes | List of all members
meta::parallel::thread_pool::concrete_task< R > Struct Template Reference

A concrete task is templated with a result type. More...

Inheritance diagram for meta::parallel::thread_pool::concrete_task< R >:
meta::parallel::thread_pool::task

Public Member Functions

template<class Function >
 concrete_task (const Function &f)
 Constructs a new concrete task. More...
 
virtual ~concrete_task ()=default
 Virtual destructor to support deletion from base pointers.
 
virtual void run () override
 Runs the given task.
 
std::future< R > get_future ()
 
- Public Member Functions inherited from meta::parallel::thread_pool::task
virtual ~task ()=default
 Virtual destructor to support deletion from base pointers.
 

Public Attributes

std::packaged_task< R()> task_
 the internal task representation
 

Detailed Description

template<class R>
struct meta::parallel::thread_pool::concrete_task< R >

A concrete task is templated with a result type.

Constructor & Destructor Documentation

§ concrete_task()

template<class R >
template<class Function >
meta::parallel::thread_pool::concrete_task< R >::concrete_task ( const Function &  f)
inline

Constructs a new concrete task.

Parameters
fThe function to run.

Member Function Documentation

§ get_future()

template<class R >
std::future<R> meta::parallel::thread_pool::concrete_task< R >::get_future ( )
inline
Returns
the future associated with this task

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