![]() |
Dash Core
0.12.2.1
P2P Digital Currency
|
#include <scheduler.h>
Public Types | |
typedef boost::function< void(void)> | Function |
Public Member Functions | |
CScheduler () | |
~CScheduler () | |
void | schedule (Function f, boost::chrono::system_clock::time_point t) |
void | scheduleFromNow (Function f, int64_t deltaSeconds) |
void | scheduleEvery (Function f, int64_t deltaSeconds) |
void | serviceQueue () |
void | stop (bool drain=false) |
size_t | getQueueInfo (boost::chrono::system_clock::time_point &first, boost::chrono::system_clock::time_point &last) const |
Private Member Functions | |
bool | shouldStop () |
Private Attributes | |
std::multimap< boost::chrono::system_clock::time_point, Function > | taskQueue |
boost::condition_variable | newTaskScheduled |
boost::mutex | newTaskMutex |
int | nThreadsServicingQueue |
bool | stopRequested |
bool | stopWhenEmpty |
Definition at line 36 of file scheduler.h.
typedef boost::function<void(void)> CScheduler::Function |
Definition at line 42 of file scheduler.h.
CScheduler::CScheduler | ( | ) |
Definition at line 13 of file scheduler.cpp.
CScheduler::~CScheduler | ( | ) |
Definition at line 17 of file scheduler.cpp.
size_t CScheduler::getQueueInfo | ( | boost::chrono::system_clock::time_point & | first, |
boost::chrono::system_clock::time_point & | last | ||
) | const |
Definition at line 122 of file scheduler.cpp.
void CScheduler::schedule | ( | CScheduler::Function | f, |
boost::chrono::system_clock::time_point | t | ||
) |
Definition at line 97 of file scheduler.cpp.
Referenced by scheduleFromNow().
void CScheduler::scheduleEvery | ( | CScheduler::Function | f, |
int64_t | deltaSeconds | ||
) |
Definition at line 117 of file scheduler.cpp.
Referenced by CConnman::Start().
void CScheduler::scheduleFromNow | ( | CScheduler::Function | f, |
int64_t | deltaSeconds | ||
) |
Definition at line 106 of file scheduler.cpp.
Referenced by Repeat(), and scheduleEvery().
void CScheduler::serviceQueue | ( | ) |
Definition at line 30 of file scheduler.cpp.
Referenced by AppInit2().
|
inlineprivate |
Definition at line 80 of file scheduler.h.
Referenced by serviceQueue().
void CScheduler::stop | ( | bool | drain = false | ) |
Definition at line 85 of file scheduler.cpp.
|
mutableprivate |
Definition at line 76 of file scheduler.h.
Referenced by getQueueInfo(), schedule(), serviceQueue(), and stop().
|
private |
Definition at line 75 of file scheduler.h.
Referenced by schedule(), serviceQueue(), and stop().
|
private |
Definition at line 77 of file scheduler.h.
Referenced by serviceQueue(), and ~CScheduler().
|
private |
Definition at line 78 of file scheduler.h.
Referenced by shouldStop(), and stop().
|
private |
Definition at line 79 of file scheduler.h.
Referenced by shouldStop(), and stop().
|
private |
Definition at line 74 of file scheduler.h.
Referenced by getQueueInfo(), schedule(), serviceQueue(), and shouldStop().