|
simple thread
|
wrap any Callable and optional arguments into an executable task More...
#include <task.hpp>
Public Member Functions | |
| data & | operator() () |
Static Public Member Functions | |
| template<typename... As> | |
| static task | make (As &&... as) |
| wrap an arbitrary Callable and optional arguments in a task More... | |
wrap any Callable and optional arguments into an executable task
A Callable is any data or object which can be executed like a function:
st:task accepts no arguments and returns void. It is useful for generically encapsulating operatins which should occur elsewhere.
st::task objects when invoked will return a reference to an st::data value when invoked containing the returned value of the wrapped Callable. If wrapped Callable returns void, the resulting st::data& will be empty and == false when used in an if statement.
st::task objects are 'lazy', when they have been evaluated once further evaluations will immediately return the previously returned value with no further work.
|
inlinestatic |
wrap an arbitrary Callable and optional arguments in a task
| as | any Callable followed by optional arguments |