Convert worker to a COpaquePointer value that could be passed via native void* pointer. Can be used as an argument of Worker.fromCPointer.
Return the current worker, if known, null otherwise. null value will be returned in the main thread or platform thread without an associated worker, non-null - if called inside worker started with Worker.start.
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.
© 2010–2019 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.native.concurrent/-worker/index.html