```inline fun completable( crossinline act...
# announcements
e
Copy code
inline fun completable(
        crossinline action: () -> Unit,
        crossinline finally: () -> Unit = {}
): Completable {
    return Completable.create { emitter ->
        try {
            action()
            emitter.onComplete()
        } catch (t: Throwable) {
            emitter.tryOnError(t)
        } finally {
            finally()
        }
    }
}