fun rxCompletable(
    context: CoroutineContext = EmptyCoroutineContext,
    block: suspend CoroutineScope.() -> Unit
): Completable

Creates cold Completable that runs a given block in a coroutine. Every time the returned completable is subscribed, it starts a new coroutine. Unsubscribing cancels running coroutine.

Coroutine action Signal to subscriber
Completes successfully onCompleted
Failure with exception or unsubscribe onError

Coroutine context can be specified with context argument. If the context does not have any dispatcher nor any other ContinuationInterceptor, then Dispatchers.Default is used. Method throws IllegalArgumentException if provided context contains a Job instance.