6210e45fbc
Multithreaded version was not working correctly and was throwing NPEs in the log sometimes
18 lines
271 B
Kotlin
18 lines
271 B
Kotlin
public object SomeClass {
|
|
private val work = object : Runnable {
|
|
override fun run() {
|
|
foo()
|
|
}
|
|
}
|
|
|
|
private fun foo(): Unit {
|
|
}
|
|
|
|
public fun run(): Unit = work.run()
|
|
}
|
|
|
|
fun box(): String {
|
|
SomeClass.run()
|
|
return "OK"
|
|
}
|