Dynamic monerod --max-concurrency, max 6

This commit is contained in:
dsc
2019-01-29 16:51:54 +01:00
parent 9689fff957
commit da3eae20f0
3 changed files with 9 additions and 5 deletions

View File

@@ -1,5 +1,6 @@
#include "DaemonManager.h"
#include <QFile>
#include <QThread>
#include <QFileInfo>
#include <QDir>
#include <QDebug>
@@ -72,7 +73,10 @@ bool DaemonManager::start(const QString &flags, NetworkType::Type nettype, const
arguments << "--check-updates" << "disabled";
// --max-concurrency based on threads available. max: 6
int32_t concurrency = qBound(1, QThread::idealThreadCount() / 2, 6);
arguments << "--max-concurrency" << QString::number(concurrency);
qDebug() << "starting monerod " + m_monerod;
qDebug() << "With command line arguments " << arguments;