Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
val myRepository = MyRepository()
val myComponent = MyComponent(myRepository)
...
val job = launch {
delay(1250)
myComponent.mySharedFlow
.onStart {
log("Collector started collecting...")
}
.collect {
log("Collected => $it")
delay(600)
}
}
val fetcher = myComponent.fetchAndEmitList()
fetcher.join()
myComponent.release()
delay(2500)
job.cancel()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.