Lely core libraries  2.2.5
lely::ev::CoTask Class Referenceabstract

A stackless coroutine which can be submitted to an executor as a task. More...

#include <co_task.hpp>

Inheritance diagram for lely::ev::CoTask:
Collaboration diagram for lely::ev::CoTask:

Public Member Functions

 CoTask (ev_exec_t *exec) noexcept
 Constructs a coroutine task with an associated executor (can be nullptr).
 
 CoTask () noexcept
 Constructs a coroutine task.
 
Executor get_executor () const noexcept
 Returns the executor to which the task is (to be) submitted.
 
virtual void operator() () noexcept=0
 The coroutine to be executed when the task is run.
 
- Public Member Functions inherited from lely::util::Coroutine
void restart () noexcept
 Resets the stackless coroutine so the next invocation starts at the beginning.
 
bool is_ready () const noexcept
 Returns true if the stackless coroutine has finished.
 
bool is_parent () const noexcept
 Returns true if the stackless coroutine is the parent of a fork.
 
bool is_child () const noexcept
 Returns true if the stackless coroutine is the child of a fork.
 

Additional Inherited Members

- Data Fields inherited from ev_task
ev_exec_texec
 A pointer to the executor to which the task is (to be) submitted.
 
ev_task_func_tfunc
 The function to be invoked when the task is run.
 

Detailed Description

A stackless coroutine which can be submitted to an executor as a task.

Definition at line 34 of file co_task.hpp.


The documentation for this class was generated from the following file: