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;
A stackless coroutine which can be submitted to an executor as a task.
CoTask() noexcept
Constructs a coroutine task.
virtual void operator()() noexcept=0
The coroutine to be executed when the task is run.
Executor get_executor() const noexcept
Returns the executor to which the task is (to be) submitted.
CoTask(ev_exec_t *exec) noexcept
Constructs a coroutine task with an associated executor (can be nullptr).
An abstract task executor. This class is a wrapper around #ev_exec_t*.
The parent class for function objects used as stackless coroutines.
This header file is part of the utilities library; it contains the C++ implementation of stackless co...
This header file is part of the event library; it contains the C++ interface for the abstract task ex...
const struct ev_exec_vtbl *const ev_exec_t
An abstract task executor.
ev_exec_t * exec
A pointer to the executor to which the task is (to be) submitted.
#define EV_TASK_INIT(exec, func)
The static initializer for ev_task.