Ring Daemon 16.0.0
Loading...
Searching...
No Matches
jami::ScheduledExecutor Class Reference

#include <scheduled_executor.h>

Collaboration diagram for jami::ScheduledExecutor:
Collaboration graph

Public Types

using clock = std::chrono::steady_clock
 
using duration = clock::duration
 
using time_point = clock::time_point
 

Public Member Functions

void run (std::function< void()> &&job, const char *filename=CURRENT_FILENAME(), uint32_t linum=CURRENT_LINE())
 Schedule job to be run ASAP.
 
std::shared_ptr< Taskschedule (std::function< void()> &&job, time_point t, const char *filename=CURRENT_FILENAME(), uint32_t linum=CURRENT_LINE())
 Schedule job to be run at time t.
 
std::shared_ptr< RepeatedTaskscheduleAtFixedRate (std::function< bool()> &&job, duration dt, const char *filename=CURRENT_FILENAME(), uint32_t linum=CURRENT_LINE())
 Schedule job to be run every dt, starting now.
 
 ScheduledExecutor (const std::string &name_)
 
std::shared_ptr< TaskscheduleIn (std::function< void()> &&job, duration dt, const char *filename=CURRENT_FILENAME(), uint32_t linum=CURRENT_LINE())
 Schedule job to be run after delay dt.
 
void stop ()
 Stop the scheduler, it is unable to be reversed.
 
 ~ScheduledExecutor ()
 

Detailed Description

Definition at line 178 of file scheduled_executor.h.

Member Typedef Documentation

◆ clock

using jami::ScheduledExecutor::clock = std::chrono::steady_clock

Definition at line 181 of file scheduled_executor.h.

◆ duration

Definition at line 183 of file scheduled_executor.h.

◆ time_point

Definition at line 182 of file scheduled_executor.h.

Constructor & Destructor Documentation

◆ ScheduledExecutor()

jami::ScheduledExecutor::ScheduledExecutor ( const std::string &  name_)

Definition at line 24 of file scheduled_executor.cpp.

References jami::emitSignal().

Here is the call graph for this function:

◆ ~ScheduledExecutor()

jami::ScheduledExecutor::~ScheduledExecutor ( )

Definition at line 36 of file scheduled_executor.cpp.

References jami::emitSignal(), and stop().

Here is the call graph for this function:

Member Function Documentation

◆ run()

void jami::ScheduledExecutor::run ( std::function< void()> &&  job,
const char filename = CURRENT_FILENAME(),
uint32_t  linum = CURRENT_LINE() 
)

Schedule job to be run ASAP.

Definition at line 62 of file scheduled_executor.cpp.

References jami::emitSignal().

Referenced by jami::runOnMainThread().

Here is the call graph for this function:

◆ schedule()

std::shared_ptr< Task > jami::ScheduledExecutor::schedule ( std::function< void()> &&  job,
time_point  t,
const char filename = CURRENT_FILENAME(),
uint32_t  linum = CURRENT_LINE() 
)

Schedule job to be run at time t.

Definition at line 72 of file scheduled_executor.cpp.

References jami::emitSignal(), and schedule().

Referenced by schedule(), scheduleIn(), and jami::Manager::scheduleTask().

Here is the call graph for this function:

◆ scheduleAtFixedRate()

std::shared_ptr< RepeatedTask > jami::ScheduledExecutor::scheduleAtFixedRate ( std::function< bool()> &&  job,
duration  dt,
const char filename = CURRENT_FILENAME(),
uint32_t  linum = CURRENT_LINE() 
)

Schedule job to be run every dt, starting now.

Definition at line 89 of file scheduled_executor.cpp.

References jami::emitSignal().

Here is the call graph for this function:

◆ scheduleIn()

std::shared_ptr< Task > jami::ScheduledExecutor::scheduleIn ( std::function< void()> &&  job,
duration  dt,
const char filename = CURRENT_FILENAME(),
uint32_t  linum = CURRENT_LINE() 
)

Schedule job to be run after delay dt.

Definition at line 81 of file scheduled_executor.cpp.

References jami::emitSignal(), and schedule().

Referenced by jami::Call::Call().

Here is the call graph for this function:

◆ stop()

void jami::ScheduledExecutor::stop ( )

Stop the scheduler, it is unable to be reversed.

Definition at line 53 of file scheduled_executor.cpp.

Referenced by ~ScheduledExecutor().


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