porting some c++ code to kotlin, I'm dealing with ...
# coroutines
e
porting some c++ code to kotlin, I'm dealing with this right now. Since I'm a newbie in coroutines, I'd like to ask you if I'm better implementing this via a
Thread
or a kotlin coroutine..
g
Coroutines! I'd recommend looking into coroutine context and especially this documentation on shared mutable state https://kotlinlang.org/docs/reference/coroutines/shared-mutable-state-and-concurrency.html There's plenty of examples there on how to share state without blocking
👍 2