From c2f4e16c598707d6999c52cf5c140b1db88bfab0 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sun, 21 Aug 2016 12:26:29 +0100 Subject: simplewallet: default to max-concurrency 1 on MacOS X A suspected bug in pthread/kernel, though might be that I messed something up too... This might rope in more platforms though. --- src/simplewallet/simplewallet.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index 3f5297dfe..eea262a3e 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -76,6 +76,13 @@ typedef cryptonote::simple_wallet sw; #define DEFAULT_MIX 4 +// workaround for a suspected bug in pthread/kernel on MacOS X +#ifdef __APPLE__ +#define DEFAULT_MAX_CONCURRENCY 1 +#else +#define DEFAULT_MAX_CONCURRENCY 0 +#endif + #define LOCK_IDLE_SCOPE() \ bool auto_refresh_enabled = m_auto_refresh_enabled.load(std::memory_order_relaxed); \ m_auto_refresh_enabled.store(false, std::memory_order_relaxed); \ @@ -108,7 +115,7 @@ namespace const command_line::arg_descriptor arg_non_deterministic = {"non-deterministic", sw::tr("Create non-deterministic view and spend keys"), false}; const command_line::arg_descriptor arg_daemon_port = {"daemon-port", sw::tr("Use daemon instance at port instead of 18081"), 0}; const command_line::arg_descriptor arg_log_level = {"log-level", "", LOG_LEVEL_0}; - const command_line::arg_descriptor arg_max_concurrency = {"max-concurrency", "Max number of threads to use for a parallel job", 0}; + const command_line::arg_descriptor arg_max_concurrency = {"max-concurrency", "Max number of threads to use for a parallel job", DEFAULT_MAX_CONCURRENCY}; const command_line::arg_descriptor arg_log_file = {"log-file", sw::tr("Specify log file"), ""}; const command_line::arg_descriptor arg_testnet = {"testnet", sw::tr("For testnet. Daemon must also be launched with --testnet flag"), false}; const command_line::arg_descriptor arg_restricted = {"restricted-rpc", sw::tr("Restricts RPC to view-only commands"), false}; -- cgit v1.2.3