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

Allow overriding default CoroutineDispatcher for WorkerBinder calls #596

Merged
merged 2 commits into from
Jun 16, 2023

Conversation

FranAguilera
Copy link
Contributor

@FranAguilera FranAguilera commented Jun 13, 2023

Description:
WorkerBinder/Worker is going away in favor of RibCoroutineWorker. Still we would like to provide a mechanism to change the default CoroutineDispatcher being used at WorkerBinder.bind calls to be other than Unconfined.

This is given that the effective threading for binding those calls happens on the main thread, potentially leading to Jank, ANR, freezes, etc.

Related issue(s):

Current Workers being bound on Main thread.

Verification:

  • Verified on rib-workers demo app
    image

  • Existing JUnit tests

@FranAguilera FranAguilera force-pushed the add_migration_api branch 2 times, most recently from 61a4bbb to 9cba3a5 Compare June 13, 2023 19:49
@FranAguilera FranAguilera added the Android Android related tickets label Jun 13, 2023
@FranAguilera FranAguilera force-pushed the add_migration_api branch 2 times, most recently from 39afa0d to 169edf3 Compare June 14, 2023 23:29
- Define a dispatchers to be used on the now deprecated WorkerBinder/Worker within RibCoroutineConfig
Copy link
Member

@tyvsmith tyvsmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing the changes we discussed.

@FranAguilera FranAguilera merged commit 7e40711 into uber:main Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android Android related tickets
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants