dispenso
A library for task parallelism
 
Loading...
Searching...
No Matches
dispenso::NewThreadInvoker Class Reference

#include <schedulable.h>

Public Member Functions

template<typename F >
void schedule (F &&f) const
 
template<typename F >
void schedule (F &&f, ForceQueuingTag) const
 

Detailed Description

A class fullfilling the Schedulable concept that always invokes on a new thread. This can be used in place of ThreadPool or TaskSet with Futures at construction or through then.

Definition at line 59 of file schedulable.h.

Member Function Documentation

◆ schedule() [1/2]

template<typename F >
void dispenso::NewThreadInvoker::schedule ( F &&  f) const
inline

Schedule a functor to be executed on a new thread.

Parameters
fThe functor to be executed. f's signature must match void(). Best performance will come from passing lambdas, other concrete functors, or OnceFunction, but std::function or similarly type-erased objects will also work.

Definition at line 69 of file schedulable.h.

◆ schedule() [2/2]

template<typename F >
void dispenso::NewThreadInvoker::schedule ( F &&  f,
ForceQueuingTag   
) const
inline

Schedule a functor to be executed on a new thread.

Parameters
fThe functor to be executed. f's signature must match void(). Best performance will come from passing lambdas, other concrete functors, or OnceFunction, but std::function or similarly type-erased objects will also work.

Definition at line 80 of file schedulable.h.


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