Web: implement WaitUntilStrategy (#3739)

This commit is contained in:
daxpedda 2024-06-20 23:07:42 +02:00 committed by GitHub
parent b4e83a5966
commit 3e6092b8ed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 231 additions and 14 deletions

View file

@ -44,6 +44,11 @@ changelog entry.
- On Web, add `EventLoopExtWebSys::(set_)poll_strategy()` to allow setting
control flow strategies before starting the event loop.
- On Web, add `WaitUntilStrategy`, which allows to set different strategies for
`ControlFlow::WaitUntil`. By default the Prioritized Task Scheduling API is
used, with a fallback to `setTimeout()` with a trick to circumvent throttling
to 4ms. But an option to use a Web worker to schedule the timer is available
as well, which commonly prevents any throttling when the window is not focused.
### Changed