Open
Bug 1989054
Opened 4 months ago
Updated 24 days ago
[meta] Apply Best Practices for Coroutines aka Coroutines Audit
Categories
(Firefox for Android :: Accounts and Sync, task)
Tracking
()
ASSIGNED
People
(Reporter: mcarare, Assigned: mcarare)
References
(Depends on 12 open bugs)
Details
(Keywords: meta, Whiteboard: [fxdroid][group6] )
This meta-ticket tracks the effort to review and refactor our existing Kotlin coroutine usage to align with current best practices.
The goal is to enhance application stability, improve resource management (preventing leaks and/or unnecessary work), ensure correct thread management for UI responsiveness and I/O operations, and increase the overall clarity and testability of our asynchronous code. This involves auditing coroutine scopes, cancellation handling, dispatcher usage, exception handling, and Flow implementations.
What we should look for in the existing codebase (not an exhaustive list):
- GlobalScope Usage ( we already did that once, we should see if we need to do it again and add safeguards against using it improperly)
- Coroutine Scope Management & Lifecycle
- Manual creation of curoutines inside function scopes.
- Cancellation Handling
- Dispatcher Usage
- Exception Handling ( we might swallow CancellationExceptions)
- Blocking Calls in Coroutines
- Flow Collection & Lifecycle Awareness
- Suspending Function Design
Updated•4 months ago
|
| Assignee | ||
Updated•4 months ago
|
Summary: [meta] Apply Best Practices for Coroutines → [meta] Apply Best Practices for Coroutines aka Coroutines Audit
You need to log in
before you can comment on or make changes to this bug.
Description
•