From 624c2f0d3bbd06c55d63449ce19f736515cbd1fd Mon Sep 17 00:00:00 2001 From: woodser Date: Thu, 9 Jan 2020 08:01:38 -0500 Subject: [PATCH] override max concurrency to 1 if pthreads disabled --- src/wallet/monero_wallet_core.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/wallet/monero_wallet_core.cpp b/src/wallet/monero_wallet_core.cpp index d808f4d..39e09e5 100644 --- a/src/wallet/monero_wallet_core.cpp +++ b/src/wallet/monero_wallet_core.cpp @@ -3237,6 +3237,11 @@ namespace monero { m_syncing_thread_done = false; m_syncing_interval = DEFAULT_SYNC_INTERVAL_MILLIS; + // TODO: tools::get_max_concurrency() w/o pthreads correctly returns 1 on Safari but 8 on Chrome which fails in common/threadpool constructor + #ifndef __EMSCRIPTEN_PTHREADS__ + tools::set_max_concurrency(1); + #endif + // // start auto sync loop // m_syncing_thread = boost::thread([this]() { // this->sync_thread_func();