https://kotlinlang.org logo
#coroutines
Title
# coroutines
e

elect

03/04/2020, 10:53 PM
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

Greg Hibberd

03/05/2020, 10:26 AM
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
2 Views