android / android/nowinandroid

[Bug]: Some `combine` works on Main thread

Open
#1,420 7 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Kotlin
Stars
21.8k
Forks
4.6k
Avg merge
19h 20m
Merged PRs (30d)
2

Description

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Is there a StackOverflow question about this issue?

- [X] I have searched StackOverflow

### What happened?

`map` method in `combine` flow works on Main thread.


![image](https://github.com/android/nowinandroid/assets/48680511/2d49dc9f-6154-401a-89be-e76503149d9c)

![image](https://github.com/android/nowinandroid/assets/48680511/20b3bf5c-9006-4a22-b307-53be4efdad23)

![image](https://github.com/android/nowinandroid/assets/48680511/5e5f4de7-a9d7-476b-93d4-055c9d248eb4)

|![image](https://github.com/android/nowinandroid/assets/48680511/42812853-63b0-4459-ad5b-5ed5ca3291b3)

### Relevant logcat output

_No response_

### Code of Conduct

- [X] I agree to follow this project's Code of Conduct

Contributor guide

Open the contributing guide

Research direction

The issue names the `combine` flow and its `map` method but provides no file or test location. Start by locating that flow, reproduce the reported thread behavior, and trace where the `map` callback executes; done means the callback no longer runs on Main and the behavior is covered by an appropriate regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.