eu.kevin.api.extensions.CoroutinesExtension.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kevin-jvm Show documentation
Show all versions of kevin-jvm Show documentation
JVM client implementing kevin. platform API
The newest version!
package eu.kevin.api.extensions
import kotlinx.coroutines.DelicateCoroutinesApi
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.future.future
import java.util.concurrent.CompletableFuture
@OptIn(DelicateCoroutinesApi::class)
fun suspendingToCompletableFuture(block: suspend () -> T): CompletableFuture = GlobalScope.future { block() }