We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 96de301 commit d5bdf6fCopy full SHA for d5bdf6f
kotlinx-coroutines-core/common/src/flow/SharingStarted.kt
@@ -1,6 +1,7 @@
1
package kotlinx.coroutines.flow
2
3
import kotlinx.coroutines.*
4
+import kotlinx.coroutines.flow.internal.unsafeFlow
5
import kotlinx.coroutines.internal.IgnoreJreRequirement
6
import kotlin.time.*
7
@@ -146,7 +147,7 @@ private class StartedEagerly : SharingStarted {
146
147
}
148
149
private class StartedLazily : SharingStarted {
- override fun command(subscriptionCount: StateFlow<Int>): Flow<SharingCommand> = flow {
150
+ override fun command(subscriptionCount: StateFlow<Int>): Flow<SharingCommand> = unsafeFlow {
151
var started = false
152
subscriptionCount.collect { count ->
153
if (count > 0 && !started) {
0 commit comments