mirror of
https://github.com/owenlejeune/TVTime.git
synced 2025-11-08 21:02:44 -05:00
9 lines
268 B
Kotlin
9 lines
268 B
Kotlin
package com.owenlejeune.tvtime.extensions
|
|
|
|
import kotlinx.coroutines.CoroutineScope
|
|
import kotlinx.coroutines.Dispatchers
|
|
import kotlinx.coroutines.launch
|
|
|
|
fun Any.coroutineTask(runnable: suspend () -> Unit) {
|
|
CoroutineScope(Dispatchers.IO).launch { runnable() }
|
|
} |