W3cubDocs

/Kotlin

requestTermination

Platform and version requirements: Native (1.3)
fun requestTermination(
    processScheduledJobs: Boolean = true
): Future<Unit>

Requests termination of the worker.

Parameters

processScheduledJobs - controls is we shall wait until all scheduled jobs processed, or terminate immediately. If there are jobs to be execucted with executeAfter their execution is awaited for.

© 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/request-termination.html