Slide 169
Slide 169 text
While Subscribed
@Test
fun `collect with while subscribed strategy`() = runBlockingTest {
val sharingScope = TestCoroutineScope()
val sharedFlow = flow
.onStart { println("ON START") }
.shareIn(
sharingScope,
SharingStarted.WhileSubscribed(),
1
)
}
Will not log