Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
Class used by CScheduler clients which may schedule multiple jobs which are required to be run serially. More...
#include <scheduler.h>
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 | |
CScheduler * | m_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()
|
inlineexplicit |
Definition at line 105 of file scheduler.h.
Member Function Documentation
◆ AddToProcessQueue()
void SingleThreadedSchedulerClient::AddToProcessQueue | ( | std::function< void(void)> | func | ) |
Definition at line 190 of file scheduler.cpp.
References LOCK, m_callbacks_pending, m_cs_callbacks_pending, m_pscheduler, and MaybeScheduleProcessQueue().
◆ 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 | ( | ) |
Definition at line 200 of file scheduler.cpp.
References CScheduler::AreThreadsServicingQueue(), LOCK, m_callbacks_pending, m_cs_callbacks_pending, m_pscheduler, and ProcessQueue().
◆ MaybeScheduleProcessQueue()
|
private |
Definition at line 149 of file scheduler.cpp.
References LOCK, m_are_callbacks_running, m_callbacks_pending, m_cs_callbacks_pending, m_pscheduler, ProcessQueue(), and CScheduler::schedule().
Referenced by AddToProcessQueue(), and ProcessQueue().
◆ ProcessQueue()
|
private |
Definition at line 161 of file scheduler.cpp.
References LOCK, m_are_callbacks_running, m_callbacks_pending, m_cs_callbacks_pending, and MaybeScheduleProcessQueue().
Referenced by EmptyQueue(), and MaybeScheduleProcessQueue().
Member Data Documentation
◆ m_are_callbacks_running
|
private |
Definition at line 99 of file scheduler.h.
Referenced by MaybeScheduleProcessQueue(), and ProcessQueue().
◆ m_callbacks_pending
|
private |
Definition at line 98 of file scheduler.h.
Referenced by AddToProcessQueue(), CallbacksPending(), EmptyQueue(), MaybeScheduleProcessQueue(), and ProcessQueue().
◆ m_cs_callbacks_pending
|
private |
Definition at line 97 of file scheduler.h.
Referenced by AddToProcessQueue(), CallbacksPending(), EmptyQueue(), MaybeScheduleProcessQueue(), and ProcessQueue().
◆ 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:
- src/scheduler.h
- src/scheduler.cpp