Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

SingleThreadedSchedulerClient Class Reference

Class used by CScheduler clients which may schedule multiple jobs which are required to be run serially. More...

#include <scheduler.h>

+ Collaboration diagram for SingleThreadedSchedulerClient:

Public Member Functions

 SingleThreadedSchedulerClient (CScheduler *pschedulerIn)
 
void AddToProcessQueue (std::function< void(void)> func)
 
void EmptyQueue ()
 
size_t CallbacksPending ()
 

Private Member Functions

void MaybeScheduleProcessQueue ()
 
void ProcessQueue ()
 

Private Attributes

CSchedulerm_pscheduler
 
CCriticalSection m_cs_callbacks_pending
 
std::list< std::function< void(void)> > m_callbacks_pending
 
bool m_are_callbacks_running = false
 

Detailed Description

Class used by CScheduler clients which may schedule multiple jobs which are required to be run serially.

Does not require such jobs to be executed on the same thread, but no two jobs will be executed at the same time.

Definition at line 93 of file scheduler.h.

Constructor & Destructor Documentation

◆ SingleThreadedSchedulerClient()

SingleThreadedSchedulerClient::SingleThreadedSchedulerClient ( CScheduler pschedulerIn)
inlineexplicit

Definition at line 105 of file scheduler.h.

Member Function Documentation

◆ AddToProcessQueue()

void SingleThreadedSchedulerClient::AddToProcessQueue ( std::function< void(void)>  func)

◆ CallbacksPending()

size_t SingleThreadedSchedulerClient::CallbacksPending ( )

Definition at line 210 of file scheduler.cpp.

References LOCK, m_callbacks_pending, and m_cs_callbacks_pending.

◆ EmptyQueue()

void SingleThreadedSchedulerClient::EmptyQueue ( )

◆ MaybeScheduleProcessQueue()

void SingleThreadedSchedulerClient::MaybeScheduleProcessQueue ( )
private

◆ ProcessQueue()

void SingleThreadedSchedulerClient::ProcessQueue ( )
private

Member Data Documentation

◆ m_are_callbacks_running

bool SingleThreadedSchedulerClient::m_are_callbacks_running = false
private

Definition at line 99 of file scheduler.h.

Referenced by MaybeScheduleProcessQueue(), and ProcessQueue().

◆ m_callbacks_pending

std::list<std::function<void (void)> > SingleThreadedSchedulerClient::m_callbacks_pending
private

◆ m_cs_callbacks_pending

CCriticalSection SingleThreadedSchedulerClient::m_cs_callbacks_pending
private

◆ m_pscheduler

CScheduler* SingleThreadedSchedulerClient::m_pscheduler
private

Definition at line 95 of file scheduler.h.

Referenced by AddToProcessQueue(), EmptyQueue(), and MaybeScheduleProcessQueue().


The documentation for this class was generated from the following files:
Released under the MIT license