summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/image
diff options
context:
space:
mode:
authorMorten Sørvig <morten.sorvig@qt.io>2022-05-23 10:18:45 +0200
committerMorten Sørvig <morten.sorvig@qt.io>2022-06-01 13:52:47 +0200
commit8c5b1f39f7fa2abcf94491e8fc7d1b5534fa0174 (patch)
tree7b49f7a13983d617740f335dbf9886063cfc7f1e /tests/auto/gui/image
parent86103f3af562152f642140e393c7beacac311dea (diff)
wasm: refactor event dispatcher wait logic
We support blocking the event dispatcher thread in two cases: - secondary threads: wait on a wait condition - main thread: asyncify suspend Create abstraction which implements both cases under a common API: bool QEventDispatcherWasm::wait(int timeout) void QEventDispatcherWasm::wakeUpDispatcherThread() Make QEventDispatcherWasm::wakeUp() use the new API. Also refactor the runOnMainThread functionality to provide several variants - runAsync(fn): makes an async call on the main thread, from the main thread. - runOnMainThread(fn): runs fn on the main thread, synchronously if called from the main thread. - runOnMainThreadAsync(fn): runs a fn on the main thread, always asynchronously Change-Id: Ia6ac21a162e6b8ea2d71bacf6085beb9567588b5 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Diffstat (limited to 'tests/auto/gui/image')
0 files changed, 0 insertions, 0 deletions