#include <schedulable.h>
Public Member Functions | |
| template<typename F > | |
| void | schedule (F &&f) const |
| template<typename F > | |
| void | schedule (F &&f, ForceQueuingTag) const |
A class fullfilling the Schedulable concept that immediately invokes the functor. This can be used in place of ThreadPool or TaskSet with Futures at construction or through then, or it may be used in TimedTask scheduling for short-running tasks.
Definition at line 27 of file schedulable.h.
|
inline |
Schedule a functor to be executed. It will be invoked immediately.
| f | The 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 37 of file schedulable.h.
|
inline |
Schedule a functor to be executed. It is a bit oxymoronical to call this function, since ForceQueuingTag will have no effect, and it's use is discouraged.
Definition at line 47 of file schedulable.h.