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

Remove the customization of run_in_executor for Android. #2481

Merged
merged 1 commit into from
Apr 15, 2024

Conversation

freakboy3742
Copy link
Member

@freakboy3742 freakboy3742 commented Apr 5, 2024

The Android event loop integration uses a stub implementation for run_in_executor that effectively disables the ability to run blocking code in a thread. This override doesn't appear to be necessary any more; this PR removes the override, restoring the default executor behavior.

The previous implementation was marked no-cover, so deleting that code increases code coverage. I used the example code from #2479 to verify that the default implementation worked as expected.

Fixes #2479.

PR Checklist:

  • All new features have been tested
  • All new features have been documented
  • I have read the CONTRIBUTING.md file
  • I will abide by the code of conduct

@mhsmith
Copy link
Member

mhsmith commented Apr 12, 2024

This code was added in beeware/rubicon-java#49, and the comment indicated that it had something to do with DNS. However, the test app in that PR includes DNS lookups, and it works fine on Android with the run_in_executor override removed. So unless @paulproteus can remember what it was for, I think we're OK to merge this.

However, it does raise a couple of questions [EDIT – moved to new issues]:

@mhsmith mhsmith merged commit 3ccab57 into beeware:main Apr 15, 2024
34 checks passed
@beeware beeware deleted a comment from freakboy3742 Apr 15, 2024
@freakboy3742 freakboy3742 deleted the android-executor branch April 16, 2024 01:53
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.

run_in_executor not working on android
2 participants