Don't use QMutexPool in QEventDispatcher
Use a QBasicMutex, there is no extra cost of having a mutex for this. Change-Id: Ib5b01338649002c0c21f018b2c931a8cc68027f6 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
This commit is contained in:
parent
1e6514a714
commit
8bf6d6a6ca
@ -42,7 +42,6 @@
|
||||
#include "qeventdispatcher_glib_p.h"
|
||||
#include "qeventdispatcher_unix_p.h"
|
||||
|
||||
#include <private/qmutexpool_p.h>
|
||||
#include <private/qthread_p.h>
|
||||
|
||||
#include "qcoreapplication.h"
|
||||
@ -295,8 +294,8 @@ QEventDispatcherGlibPrivate::QEventDispatcherGlibPrivate(GMainContext *context)
|
||||
: mainContext(context)
|
||||
{
|
||||
if (qgetenv("QT_NO_THREADED_GLIB").isEmpty()) {
|
||||
static int dummyValue = 0; // only used for its address
|
||||
QMutexLocker locker(QMutexPool::instance()->get(&dummyValue));
|
||||
static QBasicMutex mutex;
|
||||
QMutexLocker locker(&mutex);
|
||||
if (!g_thread_supported())
|
||||
g_thread_init(NULL);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user