Support more than one CScheduler thread for serial clients

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.
This commit is contained in:
Matt Corallo
2017-04-10 14:55:49 -04:00
parent 2fbf2dbe15
commit 08096bbbc6
4 changed files with 90 additions and 10 deletions

View File

@@ -75,8 +75,6 @@ private:
friend void ::UnregisterAllValidationInterfaces();
public:
CMainSignals();
/** Register a CScheduler to give callbacks which should run in the background (may only be called once) */
void RegisterBackgroundSignalScheduler(CScheduler& scheduler);
/** Unregister a CScheduler to give callbacks which should run in the background - these callbacks will now be dropped! */