Global rename in test data for coroutines
(cherry picked from commit 132f97b)
This commit is contained in:
committed by
Stanislav Erokhin
parent
8968bc3dd6
commit
b527a4d158
+2
-2
@@ -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
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user