Closed daxpedda closed 2 weeks ago
A few questions though: Why are we not using
wasm_bindgen_futures
internally ourselves?
We are in a few places.
While it is true that wasm_bindgen_futures::spawn_local()
actually uses queueMicrotask()
internally, it also does way more then just that, which we don't need in this case.
And why does
web_sys
not exposequeueMicrotask
?
Just missing, I will make a PR.
Just missing, I will make a PR.
Don't sweat it, we do this sort of thing all the time in Winit, just curious.
Just missing, I will make a PR.
Don't sweat it, we do this sort of thing all the time in Winit, just curious.
This also checks if its coming from a thread or not, in which case it doesn't queue it.
I also noticed some legacy code that deferred to
ControlFlow::Poll
when receiving events instead of waking up the event loop immediately, which I removed, so now events should come in faster regardless ofPollStrategy
.Fixes #3715.