Polls the task. Returns the return value if the future is completed, or std::nullopt if it is still pending. Throws an exception if the task was closed before completion or if the task threw. If the task is completed or threw, invalidates this handle.
Class TaskHandleBase<T>
#include <Task.hpp>template<typename T = void>classTaskHandleBase{ ... }
No description provided
Examples0
Public static methods0
Public member functions9
arc::TaskHandleBase&operator=()
No description provided
arc::TaskHandleBase&operator=()
No description provided
typename TaskTypedBase<T>::OutputblockOn()
Blocks until the task is completed. Do not use this inside async code. Invalidates this handle, throws if the handle is already invalid.
voidabort()
Aborts the task, ensuring it will not complete and will not get scheduled again. If the task is currently being executed, it will still run until it yields. Invalidates this handle, throws if the handle is already invalid.
voidsetName(asp::BoxedStringname)
No description provided
asp::SharedPtr<arc::TaskDebugData>getDebugData()
No description provided
boolisValid()const
Checks if the handle is valid (i.e. it points to a task that hasn’t been detached yet).
voiddetach()
Detaches from the task, letting it discard the return value and automatically cleanup once finished. This is automatically called when the handle is destroyed. Does nothing if the handle is invalid.
Fields1
;
No description provided
Protected member functions1
voidvalidate()const
No description provided