W3cubDocs

/Kotlin

thread

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

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.

© 2010–2019 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.concurrent/thread.html