Fabcoin Core  0.16.2
P2P Digital Currency
Public Member Functions | Private Member Functions | Private Attributes | List of all members
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:
[legend]

Public Member Functions

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

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 ( CScheduler pschedulerIn)
inline

Definition at line 105 of file scheduler.h.

Member Function Documentation

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

Definition at line 190 of file scheduler.cpp.

Here is the call graph for this function:

void SingleThreadedSchedulerClient::EmptyQueue ( )

Definition at line 200 of file scheduler.cpp.

Here is the call graph for this function:

void SingleThreadedSchedulerClient::MaybeScheduleProcessQueue ( )
private

Definition at line 149 of file scheduler.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void SingleThreadedSchedulerClient::ProcessQueue ( )
private

Definition at line 161 of file scheduler.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

bool SingleThreadedSchedulerClient::m_are_callbacks_running = false
private

Definition at line 99 of file scheduler.h.

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

Definition at line 98 of file scheduler.h.

CCriticalSection SingleThreadedSchedulerClient::m_cs_callbacks_pending
private

Definition at line 97 of file scheduler.h.

CScheduler* SingleThreadedSchedulerClient::m_pscheduler
private

Definition at line 95 of file scheduler.h.


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