Hey There :slightly_smiling_face: How can I return...
# kotlin-native
d
Hey There 🙂 How can I return a value to the main thread from a worker in order to inform about progress for example? e.g.:
Copy code
val progressHandler: (Int) -> Unit = {
    println("result $it")
}
val worker = Worker.start()
worker.execute(TransferMode.SAFE, { progressHandler }, { handler ->
    for(i in 0..100) {
        handler(i)
    }
})
Thanks a lot!