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:
TheCharlatan
2023-11-27 17:15:11 +01:00
parent 06069b3913
commit d5228efb53
8 changed files with 85 additions and 37 deletions

View File

@@ -1164,7 +1164,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
}, std::chrono::minutes{5});
assert(!node.validation_signals);
node.validation_signals = std::make_unique<ValidationSignals>(scheduler);
node.validation_signals = std::make_unique<ValidationSignals>(std::make_unique<SerialTaskRunner>(scheduler));
auto& validation_signals = *node.validation_signals;
// Create client interfaces for wallets that are supposed to be loaded