41 exec_coro( std::coroutine_handle< promise_type > h );
48 [[nodiscard]]
bool done()
const;
53 [[nodiscard]] std::optional< exec_record >
result();
64 std::optional< exec_record >
65 run( std::chrono::milliseconds period = std::chrono::milliseconds{ 5 } );
71 std::coroutine_handle< promise_type > h_;
Coroutine representing one execution of entire task set.
Definition: exec_coro.hpp:36
~exec_coro()
Destroys the coroutine if any.
exec_coro(std::coroutine_handle< promise_type > h)
Constructed by the coroutine mechanism from withing the promise type.
std::optional< exec_record > result()
Returns execution record with data on successfull run.
exec_coro & operator=(exec_coro &&other) noexcept
void tick()
Runs one iteration of the execution, either new task is executed or nothing happens due to all thread...
bool done() const
Execution is done after coroutine finishes it's run.
exec_coro(exec_coro &&other) noexcept
Move swaps internal pointers.
std::optional< exec_record > run(std::chrono::milliseconds period=std::chrono::milliseconds{ 5 })
Blocks until coroutine finishes it's run, returns pointer to exec_record with exact same behavior as ...
MIT License.
Definition: dag.hpp:27
Record of execution of entire task set.
Definition: records.hpp:90
Definition: exec_coro.hpp:75
void unhandled_exception()
void return_value(exec_record rec)
std::suspend_always final_suspend() const noexcept
std::optional< exec_record > value
Value returned at the end of execution.
Definition: exec_coro.hpp:87
exec_coro get_return_object()
std::exception_ptr excep
Potential exception raised from within the coroutine.
Definition: exec_coro.hpp:90
std::suspend_always initial_suspend() const