Global rename in test data for coroutines

(cherry picked from commit 132f97b)
This commit is contained in:
Stanislav Erokhin
2016-12-15 19:54:03 +03:00
committed by Stanislav Erokhin
parent 8968bc3dd6
commit b527a4d158
93 changed files with 210 additions and 210 deletions
+2 -2
View File
@@ -57,12 +57,12 @@ fun <T> async(c: @Suspend() (() -> T)): CompletableFuture<T> {
return future
}
suspend fun <V> await(f: CompletableFuture<V>) = suspendWithCurrentContinuation<V> { machine ->
suspend fun <V> await(f: CompletableFuture<V>) = CoroutineIntrinsics.suspendCoroutineOrReturn<V> { machine ->
f.whenComplete { value, throwable ->
if (throwable == null)
machine.resume(value)
else
machine.resumeWithException(throwable)
}
SUSPENDED
CoroutineIntrinsics.SUSPENDED
}
+2 -2
View File
@@ -54,12 +54,12 @@ fun <T> async(c: @Suspend() (() -> T)): CompletableFuture<T> {
return future
}
suspend fun <V> await(f: CompletableFuture<V>) = suspendWithCurrentContinuation<V> { machine ->
suspend fun <V> await(f: CompletableFuture<V>) = CoroutineIntrinsics.suspendCoroutineOrReturn<V> { machine ->
f.whenComplete { value, throwable ->
if (throwable == null)
machine.resume(value)
else
machine.resumeWithException(throwable)
}
SUSPENDED
CoroutineIntrinsics.SUSPENDED
}