![]() |
Blue Brain BioExplorer
|
#include <Task.h>
Public Types | |
using | Type = async::task< T > |
Public Member Functions | |
Task ()=default | |
template<typename F > | |
Task (F &&functor) | |
void | schedule () override |
T | result () |
auto & | get () |
![]() | |
virtual | ~AbstractTask ()=default |
void | cancel (std::function< void()> done={}) |
void | finishCancel () |
bool | canceled () const |
Protected Member Functions | |
template<typename F > | |
auto && | _setupFunctor (F &&functor) |
Protected Attributes | |
Type | _task |
![]() | |
async::cancellation_token | _cancelToken |
std::function< void()> | _cancelDone |
std::atomic_bool | _cancelled {false} |
Additional Inherited Members | |
![]() | |
Progress | progress {"Scheduling task ..."} |
A task type which is directly scheduled after creation. Its result after successful execution is of type T.
If the functor is of type TaskFunctor, it will be provided with cancel support and progress feedback possibility.
using core::Task< T >::Type = async::task<T> |
|
default |
Create an empty task; use task() and async++ to do something meaningful.
|
inlineprotected |
|
inline |
|
inline |
|
inlineoverridevirtual |
NOP for this task; tasks are running after construction.
Implements core::AbstractTask.
Reimplemented in core::DeferredTask< T >.
|
protected |