aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-08-20 21:17:50 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-08-23 13:38:00 +0100
commit80794b311455a44ba9d47f116616170839f20f8a (patch)
tree41ac7ee657bea5b9bd3bdaf9c6c25dfbcd8da644 /src/common
parentprint peer id in 0 padded hex for consistency (diff)
downloadmonero-80794b311455a44ba9d47f116616170839f20f8a.tar.xz
thread_group: set thread size to THREAD_STACK_SIZE
Diffstat (limited to 'src/common')
-rw-r--r--src/common/thread_group.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/common/thread_group.cpp b/src/common/thread_group.cpp
index 860d0b732..691a27a25 100644
--- a/src/common/thread_group.cpp
+++ b/src/common/thread_group.cpp
@@ -32,6 +32,7 @@
#include <limits>
#include <stdexcept>
+#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)));
}
}