ProAndroidDev

The latest posts from Android Professionals and Google Developer Experts.

Follow publication

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Responses (4)

Write a response

I update my view state using Functional Reactive Programming. FRP represents view state as a continuous value over time which can be represented as a BehaviorSubject. Click handlers feed events into PublishSubjects, where they are processed through…

25

Personally, I think it is a big deficit that runBlocking { } overrides previously defined threads / contexts. It makes Flow useless for SDK developers who need to assure that the right calls are done on the right thread

1

fun getFlow() = flow { emit(1) } .flowOn(Dispatchers.IO)
runBlocking { getFlow().collect {}}
Hi, I don’t get why the collect won’t run On IO.

5