-
Notifications
You must be signed in to change notification settings - Fork 3.4k
[AUDIO_WORKLETS] Move code off the main thread in locks test #25276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
122be37
to
8dcef4c
Compare
1b37d5a
to
de0aebb
Compare
I'm still marking the test as flaky, I've had one failure on CircleCI but more than 30'000+ successes without a single failure locally. Trying again with a 1-CPU VM:
|
d8bd45d
to
f81f4e3
Compare
That could be from some other audio worklet bug, I've seen |
I've also seen plain old |
This flake seems to be Chrome-specific btw - the flake does not occur on Firefox. I wonder if there could be a Chrome bug or improvement possible? |
I saw a few failures with the earlier code after the We're not running anything from Emscripten 4 in production yet (only in development), but what we've seen for years in the logs are errors when unloading the page. Usually some timeout call or worker is still running after the page is partially unloaded. |
If it is down to the worker's interaction with main, it might be why I see I had this about every other run whilst trying to get all ticks for this PR. |
But this isn't even doing any audio code, it's essentially a message passing worker. |
ProcessAudio()
behaves like it's running on the main thread, so spin locks are also blockingMainLoop()
from running*. I removed the previous workaround of a counter in the AW process callback, used to only have interaction between the audio and main thread after a delay.The previous main thread's code is now run in a worker, which still tests the spinlocks from the AW's side.
*it may also just be that the main thread is used to schedule the callbacks.