whenClosed

fun PushOutputChannel<*>.whenClosed(callback: context(Simulator) () -> Unit)

Registers a callback to be invoked when this channel closes.

Parameters

callback

the lambda to invoke when the channel closes