aboutsummaryrefslogtreecommitdiff
path: root/src/scheduler.h
AgeCommit message (Collapse)Author
2017-07-10Expose if CScheduler is being serviced, assert its not in EmptyQueueMatt Corallo
2017-07-07Flush CValidationInterface callbacks prior to destructionMatt Corallo
Note that the CScheduler thread cant be running at this point, it has already been stopped with the rest of the init threadgroup. Thus, just calling any remaining loose callbacks during Shutdown() is sane.
2017-07-07Support more than one CScheduler thread for serial clientsMatt Corallo
This will be used by CValidationInterface soon. This requires a bit of work as we need to ensure that most of our callbacks happen in-order (to avoid synchronization issues in wallet) - we keep our own internal queue and push things onto it, scheduling a queue-draining function immediately upon new callbacks.
2017-07-07Add default arg to CScheduler to schedule() a callback nowMatt Corallo
2017-05-13Replace boost::function with std::function (C++11)practicalswift
2017-03-06CScheduler boost->std::function, use millisecs for times, not secsMatt Corallo
2015-05-16More robust CScheduler unit testGavin Andresen
On a busy or slow system, the CScheduler unit test could fail because it assumed all threads would be done after a couple of milliseconds. Replace the hard-coded sleep with CScheduler stop() method that will cleanly exit the servicing threads when all tasks are completely finished.
2015-05-14CScheduler class for lightweight task schedulingGavin Andresen
Simple class to manage a task queue that is serviced by one or more threads.