home-assistant / home-assistant/android

Review creation of unbound coroutine scopes

Open
#6,001 0 comments 0 reactions 1 assignee Claimed by @TimoPtr View on GitHub
Dominant language
Kotlin
Stars
3.9k
Forks
1.1k
Avg merge
1d 12h
Merged PRs (30d)
81

Description

### Description

In the app we have a common pattern of creating `ioScope` that are basically a simple scope without lifecycle. This is nothing more than a `GlobalScope` in the end. One issue with this pattern is that we are creating many scopes and most of the time we mostly ignore that it is not tight to a lifecycle and we probably shouldn't ignore this.

In the scope of this task we should review the creation of scopes and decide if the creation of a scope is relevant
- Can we tight it to a lifecycle?
- Is there a risk to use the GlobalScope (potential crash of the application?)

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.