Workers draft (#655)

This commit is contained in:
Nikolay Igotti
2017-06-21 11:26:09 +03:00
committed by GitHub
parent 919ea4e8f7
commit 1ad50bc33f
16 changed files with 1052 additions and 48 deletions
@@ -0,0 +1,13 @@
import konan.worker.*
fun main(args: Array<String>) {
val worker = startWorker()
val future = worker.schedule(TransferMode.CHECKED, { "Input".shallowCopy()}) {
input -> input + " processed"
}
future.consume {
result -> println("Got $result")
}
worker.requestTermination().consume { _ -> }
println("OK")
}