mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-07 12:32:26 +00:00
Fix potential bug affecting export and preview with threads.
QThreadPool::maxThreadCount() defaults in general to 2 on single or dual-processor. This is clearly not enough in a time where we use threads for document preview and/or export. 20 should be OK. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33790 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
a0aabe4ed9
commit
44fb52d1a2
@ -104,6 +104,7 @@
|
||||
#include <QTextCodec>
|
||||
#include <QTimer>
|
||||
#include <QTranslator>
|
||||
#include <QThreadPool>
|
||||
#include <QWidget>
|
||||
|
||||
#ifdef Q_WS_X11
|
||||
@ -820,6 +821,11 @@ GuiApplication::GuiApplication(int & argc, char ** argv)
|
||||
connect(&d->general_timer_, SIGNAL(timeout()),
|
||||
this, SLOT(handleRegularEvents()));
|
||||
d->general_timer_.start();
|
||||
|
||||
// maxThreadCount() defaults in general to 2 on single or dual-processor.
|
||||
// This is clearly not enough in a time where we use threads for
|
||||
// document preview and/or export. 20 should be OK.
|
||||
QThreadPool::globalInstance()->setMaxThreadCount(20);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user