From 80794b311455a44ba9d47f116616170839f20f8a Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sun, 20 Aug 2017 21:17:50 +0100 Subject: [PATCH] thread_group: set thread size to THREAD_STACK_SIZE --- src/common/thread_group.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/common/thread_group.cpp b/src/common/thread_group.cpp index 860d0b73..691a27a2 100644 --- a/src/common/thread_group.cpp +++ b/src/common/thread_group.cpp @@ -32,6 +32,7 @@ #include #include +#include "cryptonote_config.h" #include "common/util.h" namespace tools @@ -63,8 +64,10 @@ thread_group::data::data(std::size_t count) , has_work() , stop(false) { threads.reserve(count); + boost::thread::attributes attrs; + attrs.set_stack_size(THREAD_STACK_SIZE); while (count--) { - threads.push_back(boost::thread(&thread_group::data::run, this)); + threads.push_back(boost::thread(attrs, boost::bind(&thread_group::data::run, this))); } }