requestSession() should set "pending immersive session" synchronously #643
Labels
fixed by pending PR
A PR that is in review will resolve this issue.
help wanted
This is a good issue for anyone to pick up and work on filing a PR for.
Milestone
The requestSession() algorithm currently sets "pending immersive session" to true and false in the asynchronous ("in parallel") part of the algorithm.
I believe this makes it possible to have concurrent outstanding requests (i.e., if two calls are successive). Also, I'm not sure there is any inherent synchronization between runs of "steps in parallel." Thus, the "in parallel" part of the algorithm might actually run at the same time. I believe the right way to handle synchronization is on the main thread, which is the synchronous part of the algorithm.
Thus, "pending immersive session" should be checked and set to true in an early synchronous part of the algorithm, and it should be cleared inside a task queueing a task (to the main thread).
The text was updated successfully, but these errors were encountered: