Lely core libraries 2.3.4
lely::ev::Task Class Reference

A basic task. More...

#include <task.hpp>

Inheritance diagram for lely::ev::Task:
Collaboration diagram for lely::ev::Task:

Public Member Functions

template<class F >
 Task (ev_exec_t *exec, F &&f)
 Constructs a task from a callable object with an associated executor (can be nullptr).
 
template<class F >
 Task (F &&f)
 Constructs a task from a callable object.
 
Executor get_executor () const noexcept
 Returns the executor to which the task is (to be) submitted.
 

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 basic task.

This class turns a callable object with signature void() into a task which can be submitted to an executor.

Definition at line 86 of file task.hpp.


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