All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jvmMain.money.terra.sdk.tools.java.SuspendHelper.kt Maven / Gradle / Ivy

The newest version!
@file:JvmName("SuspendHelper")

package money.terra.sdk.tools.java

import kotlinx.coroutines.Deferred
import kotlinx.coroutines.future.asCompletableFuture
import kotlinx.coroutines.runBlocking
import java.util.concurrent.CompletableFuture

fun  runBlocking(block: suspend () -> T): T = runBlocking { block() }

fun  toFuture(deferred: Deferred): CompletableFuture = deferred.asCompletableFuture()




© 2015 - 2025 Weber Informatics LLC | Privacy Policy