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

Threading library #13

Closed
BenHenning opened this issue Aug 2, 2019 · 5 comments
Closed

Threading library #13

BenHenning opened this issue Aug 2, 2019 · 5 comments
Labels
Priority: Essential This work item must be completed for its milestone. Z-ibt Temporary label for Ben to keep track of issues he's triaged.

Comments

@BenHenning
Copy link
Member

A threading library should be provided to encourage developers to use it rather than relying on other mechanisms (e.g. raw threads and AsyncTask) which, when used improperly, could result in crashes and other issues. This implementation should provide interop with Retrofit, and integrate well with other async mechanisms deemed safe (e.g. Kotlin coroutines with work managers or mechanisms provided by RX).

If it's needed, this threading library should also provide a lifecycle-safe manager for recurring task handling (maybe using Firebase job manager if these need to be long lived tasks).

@BenHenning BenHenning added Type: Improvement Priority: Essential This work item must be completed for its milestone. labels Aug 2, 2019
@BenHenning BenHenning added this to the Prototype milestone Aug 2, 2019
@BenHenning
Copy link
Member Author

This is blocked on #4.

@BenHenning
Copy link
Member Author

Although not specifically called out, this work may block downstream work that isn't identified until that work is in the design phase. For that reason, this work should be done as early as possible once its specific technical details are better understood.

@BenHenning BenHenning changed the title Threading library Threading library [Blocked: #4] Aug 12, 2019
@BenHenning BenHenning changed the title Threading library [Blocked: #4] Threading library Sep 5, 2019
@BenHenning
Copy link
Member Author

This was partially implemented in #85. We should resolve the remaining data source work and then determine what's needed here. At the moment, I suspect all we need is a way to easily schedule tasks on a background thread using coroutines and in a way that's interoperable with tests (#89 is related here).

@BenHenning
Copy link
Member Author

Also, consider something like #8. In both Logger and InMemoryBlockingCache, we want a sequential executor for the lifetime of that object, but isolated to that object. However, we also want to be able to carefully control total execution throughput in the app to avoid issues with low-performing devices per the work in #79.

@BenHenning
Copy link
Member Author

BenHenning commented Sep 17, 2019

This issue is too ambiguous to keep open. We now have a threading library under the util module, and per comments above it's likely to be expanded as needed. No explicit threading support has been identified that requires its own tracking issue, so closing this.

@BenHenning BenHenning added the Z-ibt Temporary label for Ben to keep track of issues he's triaged. label Sep 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Essential This work item must be completed for its milestone. Z-ibt Temporary label for Ben to keep track of issues he's triaged.
Development

No branches or pull requests

1 participant