#include <timed_task.h>
Public Member Functions | |
TimedTask (const TimedTask &)=delete | |
TimedTask (TimedTask &&other) | |
TimedTask & | operator= (const TimedTask &)=delete |
TimedTask & | operator= (TimedTask &&other) |
void | cancel () |
void | detach () |
size_t | calls () const |
~TimedTask () | |
Friends | |
class | TimedTaskScheduler |
A timed task type. This encapsulates a function that will run at a time scheduled in the future, and optionally periodically for a specified number of times.
Definition at line 40 of file timed_task.h.
|
inline |
Definition at line 43 of file timed_task.h.
|
inline |
Destroy the timed task. If detach() has not been called, this will cancel further calls to the underlying scheduled function, and will wait if necessary until the function is no longer in progress. This is to naturally protect resources that may be used by the function. If detach() was called, the destructor will not block.
Definition at line 85 of file timed_task.h.
|
inline |
See how many calls there have been to the underlying function have completed thus far.
Definition at line 74 of file timed_task.h.
|
inline |
Cancel the task. No further runs to the underlying function will occur (though any calls in progress will complete).
Definition at line 55 of file timed_task.h.
|
inline |
Detach this task so that it cannot block in destruction, and destruction does not cancel further runs to the underlying function. This is only to be used in cases where the underlying schedulable and any function resources are expected to outlive any other copy of the task.
Definition at line 65 of file timed_task.h.
Definition at line 46 of file timed_task.h.
|
friend |
Definition at line 117 of file timed_task.h.