aboutsummaryrefslogtreecommitdiff
path: root/src/util.cpp
diff options
context:
space:
mode:
authorfanquake <[email protected]>2017-04-25 09:34:23 +0800
committerfanquake <[email protected]>2017-12-15 14:47:43 +0800
commit937bf4335bc58c443645dc29b8d7ceadc81e74e5 (patch)
tree16eef2cc06b1d9d4560f2c7937c18d80beacc714 /src/util.cpp
parentMerge #10839: Don't use pass by reference to const for cheaply-copied types (... (diff)
downloaddiscoin-937bf4335bc58c443645dc29b8d7ceadc81e74e5.tar.xz
discoin-937bf4335bc58c443645dc29b8d7ceadc81e74e5.zip
Use std::thread::hardware_concurrency, instead of Boost, to determine available cores
Diffstat (limited to 'src/util.cpp')
-rw-r--r--src/util.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/util.cpp b/src/util.cpp
index a3e4b0acf..930549188 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -77,6 +77,7 @@
#include <openssl/crypto.h>
#include <openssl/rand.h>
#include <openssl/conf.h>
+#include <thread>
// Application startup time (used for uptime calculation)
const int64_t nStartupTime = GetTime();
@@ -891,11 +892,7 @@ bool SetupNetworking()
int GetNumCores()
{
-#if BOOST_VERSION >= 105600
- return boost::thread::physical_concurrency();
-#else // Must fall back to hardware_concurrency, which unfortunately counts virtual cores
- return boost::thread::hardware_concurrency();
-#endif
+ return std::thread::hardware_concurrency();
}
std::string CopyrightHolders(const std::string& strPrefix)