W3cubDocs

/Kotlin

start

Platform and version requirements: Native (1.3)
fun start(
    errorReporting: Boolean = true, 
    name: String? = null
): Worker

Start new scheduling primitive, such as thread, to accept new tasks via execute interface. Typically new worker may be needed for computations offload to another core, for IO it may be better to use non-blocking IO combined with more lightweight coroutines.

Parameters

errorReporting - controls if an uncaught exceptions in the worker will be printed out

name - defines the optional name of this worker, if none - default naming is used.

Return worker object, usable across multiple concurrent contexts.

© 2010–2020 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.native.concurrent/-worker/start.html