We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4f5f960 commit 706a2abCopy full SHA for 706a2ab
src/main/kotlin/dev/silenium/libs/flows/impl/CloningFlow.kt
@@ -49,8 +49,9 @@ class CloningFlow<T : Reference<T>>(private val wrapped: Flow<T>? = null) : Flow
49
suspend fun publish(value: T): Unit = publishLock.withReentrantLock {
50
coroutineScope {
51
collectors.map { (_, collector) ->
52
- value.clone().getOrThrow().use { item ->
53
- launch { collector.emit(item) }
+ val item = value.clone().getOrThrow()
+ launch {
54
+ collector.emit(item)
55
}
56
}.joinAll()
57
0 commit comments