onTermination

abstract fun onTermination(action: () -> Unit)
abstract fun onTermination(closeable: Closeable)