I got a function, not in the main loop, that needs file from a user.
I used AsyncFilePicker with wasm_bindgen_futures::spawn_local. However, this leads to the function continuing to run past that point and straight into a data race, where the file picker always loses since it is scheduled at the next tick, and the outer function wants to return immediately. I tried to approach this problem with channels, but I can't block the thread to wait on one.
I got a function, not in the main loop, that needs file from a user.
I used
AsyncFilePicker
withwasm_bindgen_futures::spawn_local
. However, this leads to the function continuing to run past that point and straight into a data race, where the file picker always loses since it is scheduled at the next tick, and the outer function wants to return immediately. I tried to approach this problem with channels, but I can't block the thread to wait on one.