mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
minor fixes
Signed-off-by: Pratik Mankawde <3397372+pratikmankawde@users.noreply.github.com>
This commit is contained in:
@@ -235,7 +235,7 @@ public:
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
ApplicationImp(std::unique_ptr<Config> config, std::unique_ptr<Logs> logs, std::unique_ptr<TimeKeeper> timeKeeper)
|
||||
: BasicApp(numberOfThreads(*config))
|
||||
: BasicApp(numberOfThreads(*config), DeferStart{})
|
||||
, config_(std::move(config))
|
||||
, logs_(std::move(logs))
|
||||
, timeKeeper_(std::move(timeKeeper))
|
||||
|
||||
@@ -5,6 +5,12 @@
|
||||
#include <boost/asio/executor_work_guard.hpp>
|
||||
|
||||
BasicApp::BasicApp(std::size_t numberOfThreads) : numberOfThreads_(numberOfThreads)
|
||||
{
|
||||
work_.emplace(boost::asio::make_work_guard(io_context_));
|
||||
startIOThreads();
|
||||
}
|
||||
|
||||
BasicApp::BasicApp(std::size_t numberOfThreads, DeferStart) : numberOfThreads_(numberOfThreads)
|
||||
{
|
||||
work_.emplace(boost::asio::make_work_guard(io_context_));
|
||||
}
|
||||
|
||||
@@ -26,6 +26,13 @@ public:
|
||||
}
|
||||
|
||||
protected:
|
||||
// Construct without starting threads. Derived classes must call
|
||||
// startIOThreads() once construction is complete.
|
||||
struct DeferStart
|
||||
{
|
||||
};
|
||||
BasicApp(std::size_t numberOfThreads, DeferStart);
|
||||
|
||||
void
|
||||
startIOThreads();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user