Skip to content
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

fix: add additional lock when calling wait_for_work on android #3524

Merged
merged 2 commits into from
Jan 8, 2025

Conversation

jkelleyrtp
Copy link
Member

The android_runtime_lock function helps paper over an issue in wry where event handlers are allowed to be ran concurrently across multiple threads even though the API takes single-threaded structures.

We need to lock the mutex when we call "wait_for_work" since that operation might poll async tasks still stuck in the queue.

Fixes #3464

I would like to get tests here at some point but that will require a proper android test harness

@jkelleyrtp jkelleyrtp merged commit 5815e05 into main Jan 8, 2025
17 checks passed
@jkelleyrtp jkelleyrtp deleted the jk/android-sync-lock2 branch January 8, 2025 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BorrowMutError with async block event handler on Android
1 participant