Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

723
Views
What is the hot flow and cold flow in coroutines and the difference between them?

I am mastering Kotlin coroutines and trying to figure out

1- what is hot flow and cold flow ?

2- what is the main difference between them?

3- when to use each one?

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

A cold stream does not start producing values until one starts to collect them. A hot stream on the other hand starts producing values immediately.

I would recommend to read below to understand hot and cold steams with usage:

https://balwindersinghrajput.medium.com/complete-guide-to-livedata-and-flow-answering-why-where-when-and-which-6b31496ba7f3 https://developer.android.com/kotlin/flow/stateflow-and-sharedflow

over 4 years ago · Santiago Trujillo Report

0

Form Here (+)

Cold vs Hot streams

Well, I really struggled with this concept because it is a little bit tricky. The main difference between cold and hot happened to be pretty simple: Hot streams produce when you don’t care while in cold streams, if you don’t collect() (or RxJava-s equivalent subscribe()) the stream won’t be activated at all. So, Flows are what we call cold streams. Removing the subscriber will not produce data at all, making the Flows one of the most sophisticated asynchronous stream API ever (in the JVM world).

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!