5 #ifndef BITCOIN_SCHEDULER_H 6 #define BITCOIN_SCHEDULER_H 13 #include <boost/chrono/chrono.hpp> 14 #include <boost/thread.hpp> 67 void stop(
bool drain=
false);
78 std::multimap<boost::chrono::system_clock::time_point, Function>
taskQueue;
Class used by CScheduler clients which may schedule multiple jobs which are required to be run serial...
std::multimap< boost::chrono::system_clock::time_point, Function > taskQueue
void MaybeScheduleProcessQueue()
void scheduleEvery(Function f, int64_t deltaMilliSeconds)
std::function< void()> Function
void scheduleFromNow(Function f, int64_t deltaMilliSeconds)
void AddToProcessQueue(std::function< void()> func)
Add a callback to be executed.
void schedule(Function f, boost::chrono::system_clock::time_point t=boost::chrono::system_clock::now())
CScheduler * m_pscheduler
void stop(bool drain=false)
SingleThreadedSchedulerClient(CScheduler *pschedulerIn)
boost::condition_variable newTaskScheduled
boost::mutex newTaskMutex
size_t CallbacksPending()
std::list< std::function< void()> > m_callbacks_pending GUARDED_BY(m_cs_callbacks_pending)
CCriticalSection m_cs_callbacks_pending
bool AreThreadsServicingQueue() const
clock::time_point time_point
int nThreadsServicingQueue
size_t getQueueInfo(boost::chrono::system_clock::time_point &first, boost::chrono::system_clock::time_point &last) const