qt5base-lts/mkspecs/wasm-emscripten
Morten Johan Sørvig ecb92aacab wasm: add new event dispatcher implementation
Add QEventDispatcherWasm to QtCore. The event dispatcher
supports managing event queue wakeups and timers, both
for the main thread or for secondary threads.

Blocking in processEvents() (using QEventLoop::WaitForMoreEvents)
is supported when running on a secondary thread, or
on the main thread when Qt is built with Emscripten’s
asyncify support.

Code is shared for all both modes as far as possible,
with breakout functions which handle main and secondary
thread as well as asyncify specifics,. Some functions
like wakeUp() can be called from any thread, and needs
to take the calling thread into consideration as well.

The current asyncify implementation in Emscripten is
restricted to one level of suspend, and this restriction
carries over to Qt as well. In practice this means we
support one level of exec()-like API.

Note that this commit does not _enable_ use of the
new event dispatcher. This will be done in separate
commits.

Task-number: QTBUG-76007
Task-number: QTBUG-64020
Change-Id: I77dc9ba34bcff59ef05dd23a46dbf1873cbe6780
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-08-27 15:45:25 +02:00
..
qmake.conf wasm: add new event dispatcher implementation 2021-08-27 15:45:25 +02:00
qplatformdefs.h WebAssembly for QtBase 2018-08-30 06:48:33 +00:00