|
dispenso 1.4.1
A library for task parallelism
|
#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 42 of file timed_task.h.
|
inline |
Definition at line 45 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 87 of file timed_task.h.
|
inline |
See how many calls there have been to the underlying function have completed thus far.
Definition at line 76 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 57 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 67 of file timed_task.h.
Definition at line 48 of file timed_task.h.
|
friend |
Definition at line 120 of file timed_task.h.