mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-12-03 12:33:13 +00:00
thread_group: set thread size to THREAD_STACK_SIZE
This commit is contained in:
parent
5524bc3151
commit
80794b3114
1 changed files with 4 additions and 1 deletions
|
@ -32,6 +32,7 @@
|
||||||
#include <limits>
|
#include <limits>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|
||||||
|
#include "cryptonote_config.h"
|
||||||
#include "common/util.h"
|
#include "common/util.h"
|
||||||
|
|
||||||
namespace tools
|
namespace tools
|
||||||
|
@ -63,8 +64,10 @@ thread_group::data::data(std::size_t count)
|
||||||
, has_work()
|
, has_work()
|
||||||
, stop(false) {
|
, stop(false) {
|
||||||
threads.reserve(count);
|
threads.reserve(count);
|
||||||
|
boost::thread::attributes attrs;
|
||||||
|
attrs.set_stack_size(THREAD_STACK_SIZE);
|
||||||
while (count--) {
|
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)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue