# WhileSubscribed(5000)

DevFeed: [WhileSubscribed(5000)](<https://devfeed.tech/articles/whilesubscribed-5000-25635.md>)

Original publisher: [Read original article](<https://blog.p-y.wtf/whilesubscribed5000>)

Author: Pierre-Yves Ricau

Published: 2022-08-30T23:01:56Z

Content type: tutorial

Language: en

Sources: [Py's blog](<https://devfeed.tech/sources/py-s-blog.md>)

Topics: [Compose](<https://devfeed.tech/topics/compose.md>), [Android](<https://devfeed.tech/topics/android.md>), [now-in-android](<https://devfeed.tech/topics/now-in-android.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [compose](<https://devfeed.tech/tags/compose.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [now-in-android](<https://devfeed.tech/tags/now-in-android.md>), [stream](<https://devfeed.tech/tags/stream.md>)

## AI overview

An Android engineer examines the 5,000-millisecond WhileSubscribed timeout in Kotlin flow state sharing, explaining how it affects upstream work during configuration changes and considering alternatives such as sharing without a timeout or using Eagerly.

## Source excerpt

👋 Hi, this is P.Y., I work as an Android Engineer at Block. I know nothing about Compose so please let me know if I messed up on Twitter! I've been hacking on a new LeakCanary standalone app to visua