mirror of
https://github.com/feather-wallet/feather.git
synced 2025-03-12 09:37:47 +00:00
scheduler: don't hardcode maxThreadCount, set minimum to 8
This commit is contained in:
parent
aa78e57148
commit
1dc8705c65
2 changed files with 5 additions and 4 deletions
|
@ -232,6 +232,11 @@ if (AttachConsole(ATTACH_PARENT_PROCESS)) {
|
|||
EventFilter filter;
|
||||
app.installEventFilter(&filter);
|
||||
|
||||
auto *pool = QThreadPool::globalInstance();
|
||||
if (pool->maxThreadCount() < 8) {
|
||||
pool->setMaxThreadCount(8);
|
||||
}
|
||||
|
||||
WindowManager windowManager(QCoreApplication::instance(), &filter);
|
||||
|
||||
QObject::connect(&app, &SingleApplication::instanceStarted, [&windowManager]() {
|
||||
|
|
|
@ -6,10 +6,6 @@
|
|||
FutureScheduler::FutureScheduler(QObject *parent)
|
||||
: QObject(parent), Alive(0), Stopping(false)
|
||||
{
|
||||
static std::once_flag once;
|
||||
std::call_once(once, []() {
|
||||
QThreadPool::globalInstance()->setMaxThreadCount(4);
|
||||
});
|
||||
}
|
||||
|
||||
FutureScheduler::~FutureScheduler()
|
||||
|
|
Loading…
Reference in a new issue