From e0a9bc3ca6dc20a68f8c5668f471907ef1096d92 Mon Sep 17 00:00:00 2001 From: Graham Date: Sat, 2 Jan 2021 13:24:36 +0000 Subject: [PATCH] Rename suspend to awaitSuspend Ideally I'd like to just call this await, but it conflicts with an existing method. Signed-off-by: Graham --- .../main/kotlin/org/openrs2/archive/cache/CacheDownloader.kt | 4 ++-- net/src/main/kotlin/dev/openrs2/net/FutureExtensions.kt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/archive/src/main/kotlin/org/openrs2/archive/cache/CacheDownloader.kt b/archive/src/main/kotlin/org/openrs2/archive/cache/CacheDownloader.kt index 60cf76fb..0855bdb9 100644 --- a/archive/src/main/kotlin/org/openrs2/archive/cache/CacheDownloader.kt +++ b/archive/src/main/kotlin/org/openrs2/archive/cache/CacheDownloader.kt @@ -1,7 +1,7 @@ package org.openrs2.archive.cache import dev.openrs2.net.BootstrapFactory -import dev.openrs2.net.suspend +import dev.openrs2.net.awaitSuspend import javax.inject.Inject import javax.inject.Singleton import kotlin.coroutines.suspendCoroutine @@ -22,7 +22,7 @@ public class CacheDownloader @Inject constructor( .connect(hostname, port) } } finally { - group.shutdownGracefully().suspend() + group.shutdownGracefully().awaitSuspend() } } } diff --git a/net/src/main/kotlin/dev/openrs2/net/FutureExtensions.kt b/net/src/main/kotlin/dev/openrs2/net/FutureExtensions.kt index 1fc3c9ef..edb60306 100644 --- a/net/src/main/kotlin/dev/openrs2/net/FutureExtensions.kt +++ b/net/src/main/kotlin/dev/openrs2/net/FutureExtensions.kt @@ -5,7 +5,7 @@ import kotlin.coroutines.resume import kotlin.coroutines.resumeWithException import kotlin.coroutines.suspendCoroutine -public suspend fun Future.suspend(): V { +public suspend fun Future.awaitSuspend(): V { if (isDone) { if (isSuccess) { return now