Lely core libraries
2.2.5
|
Go to the documentation of this file.
24 #ifndef LELY_EV_CO_TASK_HPP_
25 #define LELY_EV_CO_TASK_HPP_
39 auto self =
static_cast<CoTask*
>(task);
46 virtual ~
CoTask() =
default;
61 #endif // !LELY_EV_CO_TASK_HPP_
const struct ev_exec_vtbl *const ev_exec_t
An abstract task executor.
Executor get_executor() const noexcept
Returns the executor to which the task is (to be) submitted.
CoTask() noexcept
Constructs a coroutine task.
An abstract task executor. This class is a wrapper around #ev_exec_t*.
The parent class for function objects used as stackless coroutines.
A stackless coroutine which can be submitted to an executor as a task.
CoTask(ev_exec_t *exec) noexcept
Constructs a coroutine task with an associated executor (can be nullptr).
virtual void operator()() noexcept=0
The coroutine to be executed when the task is run.
#define EV_TASK_INIT(exec, func)
The static initializer for ev_task.
ev_exec_t * exec
A pointer to the executor to which the task is (to be) submitted.