Hello, I may have strange question, but how can I...
# coroutines
b
Hello, I may have strange question, but how can I create some
onComplete
like listener for ReceiveChannel. for now I have
Copy code
fun <T> ReceiveChannel<T>.onComplete(action: suspend () -> Unit): ReceiveChannel<T> {
    launch(Unconfined) {
        consumeEach { }
        action()
    }
    return this
}
e
Fot now that is the way to do it.