fun <T1, T2> execute( mode: TransferMode, producer: () -> T1, job: (T1) -> T2 ): Future<T2>
Plan job for further execution in the worker. Execute is a two-phase operation:
kotlin.IllegalStateException so kotlin.native.internal.GC.collect() could be called in the end of producer and job if garbage cyclic structures or other uncollected objects refer to the value being transferred.Return the future with the computation result of job.
© 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/execute.html