mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 22:18:54 +01:00
kernel: Remove dependency on CScheduler
By defining a virtual interface class for the scheduler client, users of the kernel can now define their own event consuming infrastructure, without having to spawn threads or rely on the scheduler design. Removing CScheduler also allows removing the thread and exception modules from the kernel library.
This commit is contained in:
@@ -17,11 +17,14 @@
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
namespace util {
|
||||
class TaskRunnerInterface;
|
||||
} // namespace util
|
||||
|
||||
class BlockValidationState;
|
||||
class CBlock;
|
||||
class CBlockIndex;
|
||||
struct CBlockLocator;
|
||||
class CScheduler;
|
||||
enum class MemPoolRemovalReason;
|
||||
struct RemovedMempoolTransactionInfo;
|
||||
struct NewMempoolTransactionInfo;
|
||||
@@ -160,7 +163,10 @@ private:
|
||||
std::unique_ptr<ValidationSignalsImpl> m_internals;
|
||||
|
||||
public:
|
||||
ValidationSignals(CScheduler& scheduler LIFETIMEBOUND);
|
||||
// The task runner will block validation if it calls its insert method's
|
||||
// func argument synchronously. In this class func contains a loop that
|
||||
// dispatches a single validation event to all subscribers sequentially.
|
||||
explicit ValidationSignals(std::unique_ptr<util::TaskRunnerInterface> task_runner);
|
||||
|
||||
~ValidationSignals();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user