MEL
Microthread & Execution library
mel::execution::Executor< Runnable > Class Reference

Executor specialization using Runnable as execution agent. More...

#include <RunnableExecutor.h>

Public Member Functions

 Executor (Executor &&ex)
 
 Executor (const Executor &ex)
 
 Executor (std::shared_ptr< Runnable > runnable)
 
Executoroperator= (const Executor &ex)
 
Executoroperator= (Executor &&ex)
 
void setOpts (const RunnableExecutorOpts &opts)
 
const RunnableExecutorOptsgetOpts ()
 
const std::weak_ptr< Runnable > & getRunnable () const
 
std::weak_ptr< Runnable > & getRunnable ()
 
template<class I , class F >
::mel::parallelism::Barrier loop (I &&begin, I &&end, F &&functor, int increment)
 Concurrent loop Excutes given number of iterations of given functor as independent tasks (up to executor is able to do ) More...
 
template<class TArg , class... FTypes>
::mel::parallelism::Barrier parallel (ExFuture< Runnable, TArg > fut, std::exception_ptr &except, FTypes &&... functions)
 
template<class ReturnTuple , class TArg , class... FTypes>
::mel::parallelism::Barrier parallel_convert (ExFuture< Runnable, TArg > fut, std::exception_ptr &except, ReturnTuple &result, FTypes &&... functions)
 
template<class TRet , class TArg , class F >
void launch (F &&f, TArg &&arg, ExFuture< Runnable, TRet > output) const noexcept
 
template<class TRet , class F >
void launch (F &&f, ExFuture< Runnable, TRet > output) const noexcept
 
template<class I , class F >
::mel::parallelism::Barrier loop (I &&begin, I &&end, F &&functor, int increment)
 
template<class TArg , class... FTypes>
::mel::parallelism::Barrier parallel (ExFuture< Runnable, TArg > fut, std::exception_ptr &excpt, FTypes &&... functions)
 
template<class ReturnTuple , class TArg , class... FTypes>
::mel::parallelism::Barrier parallel_convert (ExFuture< Runnable, TArg > fut, std::exception_ptr &excpt, ReturnTuple &result, FTypes &&... functions)
 

Detailed Description

Executor specialization using Runnable as execution agent.

Member Function Documentation

◆ launch()

template<class TRet , class TArg , class F >
void mel::execution::Executor< Runnable >::launch ( F &&  f,
TArg &&  arg,
ExFuture< Runnable, TRet >  output 
) const
inlinenoexcept

brief mandatory interface from Executor

◆ loop()

template<class I , class F >
::mel::parallelism::Barrier mel::execution::Executor< Runnable >::loop ( I &&  begin,
I &&  end,
F &&  functor,
int  increment 
)

Concurrent loop Excutes given number of iterations of given functor as independent tasks (up to executor is able to do )

Parameters
fut
begin
end
functor
increment
Returns
en new Future whose value is moved from input future

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