Fix warning in RunAsync.kt

This commit is contained in:
Jonas Lochmann 2024-04-15 02:00:00 +02:00
parent 35839ced5c
commit f425f5ce2f
No known key found for this signature in database
GPG key ID: 8B8C9AEE10FA5B36

View file

@ -1,5 +1,5 @@
/* /*
* TimeLimit Copyright <C> 2019 Jonas Lochmann * TimeLimit Copyright <C> 2019 - 2024 Jonas Lochmann
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -18,6 +18,7 @@ package io.timelimit.android.coroutines
import io.timelimit.android.async.Threads import io.timelimit.android.async.Threads
import kotlinx.coroutines.* import kotlinx.coroutines.*
@OptIn(DelicateCoroutinesApi::class)
fun <T> runAsync(block: suspend CoroutineScope.() -> T) { fun <T> runAsync(block: suspend CoroutineScope.() -> T) {
GlobalScope.launch (Dispatchers.Main) { GlobalScope.launch (Dispatchers.Main) {
block() block()