我在Linux上有以下代码,使用Kotlin/原住民:
//
// This class could be in common module or in 'linuxMain' source set,
// either way doesn't work
//
class MyClass : CoroutineScope by MainScope() {
fun execute() = launch {
delay(1000)
println("finished")
}
}
fun main() = runBlocking<