File tree Expand file tree Collapse file tree 2 files changed +0
-20
lines changed
src/main/kotlin/kotlinx/coroutines/experimental/rx1 Expand file tree Collapse file tree 2 files changed +0
-20
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ Suspending extension functions and suspending iteration:
1414
1515| ** Name** | ** Description**
1616| -------- | ---------------
17- | [ Completable.await] [ rx.Completable.await ] | Awaits for completion of the completable value
1817| [ Single.await] [ rx.Single.await ] | Awaits for completion of the single value and returns it
1918| [ Observable.awaitFirst] [ rx.Observable.awaitFirst ] | Returns the first value from the given observable
2019| [ Observable.awaitLast] [ rx.Observable.awaitFirst ] | Returns the last value from the given observable
@@ -44,7 +43,6 @@ Conversion functions:
4443[ rxCompletable ] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-rx1/kotlinx.coroutines.experimental.rx1/rx-completable.html
4544[ rxSingle ] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-rx1/kotlinx.coroutines.experimental.rx1/rx-single.html
4645[ rxObservable ] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-rx1/kotlinx.coroutines.experimental.rx1/rx-observable.html
47- [ rx.Completable.await ] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-rx1/kotlinx.coroutines.experimental.rx1/rx.-completable/await.html
4846[ rx.Single.await ] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-rx1/kotlinx.coroutines.experimental.rx1/rx.-single/await.html
4947[ rx.Observable.awaitFirst ] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-rx1/kotlinx.coroutines.experimental.rx1/rx.-observable/await-first.html
5048[ rx.Observable.awaitSingle ] : https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-rx1/kotlinx.coroutines.experimental.rx1/rx.-observable/await-single.html
Original file line number Diff line number Diff line change @@ -22,24 +22,6 @@ import kotlinx.coroutines.experimental.Job
2222import kotlinx.coroutines.experimental.suspendCancellableCoroutine
2323import rx.*
2424
25- // ------------------------ Completable ------------------------
26-
27- /* *
28- * Awaits for completion of the completable value without blocking a thread and
29- * returns or throws the corresponding exception if this completable had produced error.
30- *
31- * This suspending function is cancellable.
32- * If the [Job] of the current coroutine is completed while this suspending function is waiting, this function
33- * immediately resumes with [CancellationException].
34- */
35- public suspend fun Completable.await (): Unit = suspendCancellableCoroutine { cont ->
36- subscribe(object : CompletableSubscriber {
37- override fun onSubscribe (sub : Subscription ) { cont.unsubscribeOnCompletion(sub) }
38- override fun onCompleted () { cont.resume(Unit ) }
39- override fun onError (error : Throwable ) { cont.resumeWithException(error) }
40- })
41- }
42-
4325// ------------------------ Single ------------------------
4426
4527/* *
You can’t perform that action at this time.
0 commit comments