diff options
| author | Morten Sørvig <morten.sorvig@qt.io> | 2024-11-26 15:18:18 +0100 |
|---|---|---|
| committer | Morten Sørvig <morten.sorvig@qt.io> | 2024-12-02 19:45:19 +0100 |
| commit | 16fdbbf444aa828795e3b0cd6d420eaa16540b40 (patch) | |
| tree | 556abb287cd10f985dc2c7738c1ba473f3f90930 /src/gui/doc/snippets/code | |
| parent | 92ad0f1f014909a792d157dca680fca5cff01605 (diff) | |
wasm: add macro for for emscritpen::async()
emscritpen:async() needs to be passed to embind exported
functions, if that function might suspend, and if JSPI
is enabled (and only if JSPI is enabled):
emscripten::function("fn", &fn, emscritpen:async());
Add QT_WASM_EMSCRIPTEN_ASYNC macro which evaluates
to ",emscritpen::async()" (note comma) if JSPI is enabled,
and to nothing if not.
emscripten::function("fn", &fn QT_WASM_EMSCRIPTEN_ASYNC);
This way we can configure Qt for either JSPI and non-jspi
builds. Incidentally the emscritpen::async() requirement
makes JSPI a Qt configure time feature, instead of an
app link time feature like for the current ASYNCIFY (1)
support.
Task-number: QTBUG-129749
Change-Id: I5bf820242c19a26018f4a3e06ee570e2d36ed993
Reviewed-by: Lorn Potter <lorn.potter@qt.io>
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
Diffstat (limited to 'src/gui/doc/snippets/code')
0 files changed, 0 insertions, 0 deletions
