android / android/architecture-samples
SingleLiveEvent atomic variable not required
Open
- Dominant language
- Kotlin
- Stars
- 45.8k
- Forks
- 11.9k
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I have a question regarding the SingleLiveEvent class, internally It uses an atomic boolean, but it is accessed always in the main thread. It is really required an atomic variable?
Contributor guide
Research direction
Start by locating the SingleLiveEvent class and inspecting how its atomic boolean is accessed and which threads can reach it. Confirm the class's thread guarantees and determine whether the atomic variable can be replaced; the issue names no test, so completion should include verification of the relevant behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- mobile
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100