WorkerPool: Default to 1 worker

This commit is contained in:
Jonas Kvinge 2023-03-26 00:08:23 +01:00
parent 272976f0b7
commit c3ee3318d7
1 changed files with 1 additions and 1 deletions

View File

@ -165,10 +165,10 @@ class WorkerPool : public _WorkerPoolBase {
template<typename HandlerType>
WorkerPool<HandlerType>::WorkerPool(QObject *parent)
: _WorkerPoolBase(parent),
worker_count_(1),
next_worker_(0),
next_id_(0) {
worker_count_ = qBound(1, QThread::idealThreadCount() / 2, 4);
local_server_name_ = qApp->applicationName().toLower();
if (local_server_name_.isEmpty()) {