- Use TestingSetup to DRY qt rpcnestedtests
- Make ValidationInterface signals-type-agnostic
(by hiding boost::signals stuff in the .cpp)
This allows us to give it a bit more intelligence as we move
forward, including routing some signals through CScheduler. While
the introduction of a "internals" pointer in the class is pretty
ugly, the fact that we no longer need to include boost/signals
directly from validationinterface.h is very much worth the loss.
- Give CMainSignals a reference to the global scheduler
...so that it can run some signals in the background later
- Add default arg to CScheduler to schedule() a callback now
- 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.
- Flush CValidationInterface callbacks prior to destruction
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.
- Expose if CScheduler is being serviced, assert its not in EmptyQueue
This is a backport of Core PR10179