mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-13 12:33:42 +02:00
kernel: Move background load thread to node context
The thread handle is never used by the ChainstateManager, so move it out and into the node context. Users of the kernel library now no longer have to manually join the thread when destructing the ChainstateManager.
This commit is contained in:
parent
a5e99669cc
commit
bc7900f33d
4 changed files with 4 additions and 6 deletions
|
|
@ -9,6 +9,7 @@
|
|||
#include <cstdlib>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <thread>
|
||||
#include <vector>
|
||||
|
||||
class ArgsManager;
|
||||
|
|
@ -86,6 +87,7 @@ struct NodeContext {
|
|||
std::atomic<int> exit_status{EXIT_SUCCESS};
|
||||
//! Manages all the node warnings
|
||||
std::unique_ptr<node::Warnings> warnings;
|
||||
std::thread background_init_thread;
|
||||
|
||||
//! Declare default constructor and destructor that are not inline, so code
|
||||
//! instantiating the NodeContext struct doesn't need to #include class
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue