---
title: "Discussion on \"Why Your Flow Refuses to Hop Threads: Context Preservation, flowOn, and channelFlow in Kotlin\" | Hashnode"
description: "Discussion on \"Why Your Flow Refuses to Hop Threads: Context Preservation, flowOn, and channelFlow in Kotlin\". Why withContext breaks flow { } in Kotlin. Learn context preservation, when to use flowOn or channelFlow, and the Android failures that crash apps."
url: "https://hashnode.com/posts/why-your-flow-refuses-to-hop-threads-context-preservation-flowon-and-channelflow-in-kotlin/6ae8a26f660b8eb5185b74b4"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Why Your Flow Refuses to Hop Threads: Context Preservation, flowOn, and channelFlow in Kotlin](https://android-expert.hashnode.dev/why-your-flow-refuses-to-hop-threads-context-preservation-flowon-and-channelflow-in-kotlin?utm_source=hashnode&utm_medium=feed)

Why withContext breaks flow { } in Kotlin. Learn context preservation, when to use flowOn or channelFlow, and the Android failures that crash apps.

Nov 2 · 11 min read · android-expert.hashnode.dev  
Read the article

-   [#kotlin-flow](https://hashnode.com/tag/kotlin-flow)
-   [#kotlin-coroutines](https://hashnode.com/tag/kotlin-coroutines)
-   [#coroutines](https://hashnode.com/tag/coroutines)
-   [#concurrency](https://hashnode.com/tag/concurrency)
-   [#kotlin](https://hashnode.com/tag/kotlin)

## Written by

[Android Expert](https://hashnode.com/@android-expert)

@android-expert · Chennai, India

  
[View profile](https://hashnode.com/@android-expert)

Android Expert· Kotlin, Jetpack Compose & production pitfalls

Android Engineer &amp; Kotlin Advocate. 🚀 Deep dives into Jetpack Compose, Coroutines, and Clean Architecture. Turning complex code into scalable solutions. 🛠️✨

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
