Skip to content

Commit

Permalink
Set threads to one if zero.
Browse files Browse the repository at this point in the history
  • Loading branch information
evoskuil committed May 28, 2024
1 parent 204c01e commit e650aa2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/p2p.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,14 @@ using namespace std::placeholders;

p2p::p2p(const settings& settings, const logger& log) NOEXCEPT
: settings_(settings),
threadpool_(settings.threads),
threadpool_(std::min(settings.threads, 1_u32)),
strand_(threadpool_.service().get_executor()),
hosts_(settings, log),
broadcaster_(strand_),
stop_subscriber_(strand_),
connect_subscriber_(strand_),
reporter(log)
{
BC_ASSERT_MSG(!is_zero(settings.threads), "empty threadpool");

////LOG_LOG("Aplication log compiled..: ", news_defined);
////LOG_LOG("News log compiled........: ", news_defined);
////LOG_LOG("Session log compiled.....: ", session_defined);
Expand Down

0 comments on commit e650aa2

Please sign in to comment.