summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@qt.io>2021-08-18 14:54:11 +0200
committerMorten Johan Sørvig <morten.sorvig@qt.io>2021-08-27 15:45:25 +0200
commit89cda52d66053c1cdddc709bedb2c1bf1e4b30cd (patch)
tree4a07a6a5069957d6ed5e9274f6898ede30005b1a /src/corelib/thread
parentecb92aacab2820ecbd4237f0db0fa2311fec32d2 (diff)
wasm: enable the new event dispatcher for qtcore
Use the new event dispatcher for all non-GUI threads, nn practice for the main thread when using QCoreApplication, and when calling QThread::exec(). Change-Id: I9184d52532e06da7e6a87ee27c7d53e0d15e693a Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/corelib/thread')
-rw-r--r--src/corelib/thread/qthread_unix.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/corelib/thread/qthread_unix.cpp b/src/corelib/thread/qthread_unix.cpp
index 4cbe072727..ad13f10890 100644
--- a/src/corelib/thread/qthread_unix.cpp
+++ b/src/corelib/thread/qthread_unix.cpp
@@ -47,6 +47,8 @@
#if defined(Q_OS_DARWIN)
# include <private/qeventdispatcher_cf_p.h>
+#elif defined(Q_OS_WASM)
+# include <private/qeventdispatcher_wasm_p.h>
#else
# if !defined(QT_NO_GLIB)
# include "../kernel/qeventdispatcher_glib_p.h"
@@ -250,6 +252,8 @@ QAbstractEventDispatcher *QThreadPrivate::createEventDispatcher(QThreadData *dat
return new QEventDispatcherCoreFoundation;
else
return new QEventDispatcherUNIX;
+#elif defined(Q_OS_WASM)
+ return new QEventDispatcherWasm();
#elif !defined(QT_NO_GLIB)
const bool isQtMainThread = data->thread.loadAcquire() == QCoreApplicationPrivate::mainThread();
if (qEnvironmentVariableIsEmpty("QT_NO_GLIB")