dispenso 1.4.1
A library for task parallelism
Loading...
Searching...
No Matches
timed_task.h File Reference
#include <chrono>
#include <functional>
#include <memory>
#include <queue>
#include <dispenso/detail/timed_task_impl.h>
#include <dispenso/priority.h>
#include <dispenso/timing.h>

Go to the source code of this file.

Classes

class  dispenso::TimedTask
 
class  dispenso::TimedTaskScheduler
 

Enumerations

enum class  dispenso::TimedTaskType { kNormal , kSteady }
 

Functions

TimedTaskSchedulerdispenso::globalTimedTaskScheduler ()
 

Detailed Description

Utilities for delaying a task until a future time and periodic scheduling.

Definition in file timed_task.h.

Enumeration Type Documentation

◆ TimedTaskType

enum class dispenso::TimedTaskType
strong

For periodic tasks, this type will describe the behavior of how tasks are scheduled

Enumerator
kNormal 

Schedule the next task at period plus the time the first or most recent task ran.

kSteady 

Schedule the next task at period plus the time the first or most recent task was scheduled for

Definition at line 30 of file timed_task.h.

Function Documentation

◆ globalTimedTaskScheduler()

DISPENSO_DLL_ACCESS TimedTaskScheduler & dispenso::globalTimedTaskScheduler ( )

Access the global timed task scheduler. Most applications should only require one scheduler.

Returns
A reference to the single instance global timed task scheduler.

Definition at line 118 of file timed_task.cpp.