Class Platform::Task#

Nested Relationships#

This class is a nested type of Class Platform.

Class Documentation#

class Task

An task that is passed to the Platform::run_in_event_loop function and needs to be run in the event loop and not in any other thread.

Public Functions

inline ~Task()
Task(const Task&) = delete
Task &operator=(const Task&) = delete
inline Task(Task &&other)

Move constructor. A moved from Task can no longer be run.

inline Task &operator=(Task &&other)

Move operator.

inline void run() &&

Run the task.

Can only be invoked once and should only be called from the event loop.