@MarSe32m I am experiencing exactly the same issue, on both Mac and Android.
@John_McCall FYI, since I mentioned the same thing here
The only way I can think of debugging this is to build Swift and put logs everywhere to try to understand the data flow, but
a) the last time I tried to build Swift it took days of my time and I didn't get it working in the end, and
b) surely there's a better way?
@kateinoigakukun you apparently got this working for SwiftWasm with the cooperative global executor, do you have any ideas why it wouldn't work when using the DispatchGlobalExecutor
?
edit: Actually, since Wasm only has a single thread anyway, everything can be enqueued via swift_task_enqueueGlobal_hook
. I have a hunch that swift_task_enqueueMainExecutor_hook
is not actually called there either, currently. Which seems especially likely given that the global hook, as written, hooks all jobs and does not forward them to the original impl
.