Answers for "thread in kotlin"

5

kotlin thread

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

Browse Popular Code Answers by Language