![]() |
Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
|
Coroutine which performs the actual work. More...
#include <Loader.h>
Classes | |
| class | promise_type |
Public Member Functions | |
| Task (const Task &)=delete | |
| Task & | operator= (const Task &)=delete |
| Task (Task &&other) noexcept | |
| Task & | operator= (Task &&other) noexcept |
| ~Task () | |
| double | GetProgress () const noexcept |
| void | Step (const double timeBudget) |
| bool | IsDone () const noexcept |
| int | Get () const noexcept |
Private Member Functions | |
| Task (std::coroutine_handle< promise_type > h) noexcept | |
Private Attributes | |
| std::coroutine_handle< promise_type > | m_Handle |
Coroutine which performs the actual work.
co_yield ... can be used to yield the current progress. Iff the timeout is reached, the coroutine suspends. co_await std::suspend_always{} is usefull to force a suspention. e.g. When no progress can be made such as when the work is done on a different thread. co_return 0 notifies the loader that the task is fineshed without an error. co_return ... when the returned value is negative the loader interprets that as a task failure. PS::Loader::ProgressiveLoad will abort immediately and forward the error code.
|
delete |
|
inlinenoexcept |
|
inline |
|
inlineexplicitprivatenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
|
private |