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