Answers for "kotlin run new thread"

1

thread in kotlin

/// this code is actaully for kotlin but works in Java with changes.

Thread(Runnable{
  	// here goes you code that runs in the background
    }).start()
Posted by: Guest on September-25-2021
4

kotlin thread

runBlocking {
    val job = launch(Dispatchers.Default) {  
        println("${Thread.currentThread()} has run.") 
    }
}
Posted by: Guest on August-20-2021

Browse Popular Code Answers by Language