mirror of
https://codeberg.org/timelimit/timelimit-android.git
synced 2025-10-03 09:49:25 +02:00
Fix warning in RunAsync.kt
This commit is contained in:
parent
35839ced5c
commit
f425f5ce2f
1 changed files with 2 additions and 1 deletions
|
@ -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()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue