thread

JVM
1.0
fun thread (
start : Boolean = true ,
isDaemon : Boolean = false ,
contextClassLoader : ClassLoader ? = null ,
name : String ? = null ,
priority : Int = -1 ,
block : ( ) -> Unit
) : Thread

(source)

Creates a thread that runs the specified block of code.

Parameters

start - if true , the thread is immediately started.

isDaemon - if true , the thread is created as a daemon thread. The Java Virtual Machine exits when the only threads running are all daemon threads.

contextClassLoader - the class loader to use for loading classes and resources in this thread.

name - the name of the thread.

priority - the priority of the thread.