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

uli

08/09/2018, 12:54 PM
@groostav await should preserve the happens before semantic. Everything happening inside the async should be visible to everything happening after the async But I would also guess for some threading issue. @nayanjyoti is your
a
shared somewhere else, where it could be reset to null?
n

nayanjyoti

08/10/2018, 6:17 AM
@uli: well it’s not shared in that way. however the
map
invocations are returning the same instance, maybe its loaded in the cpu cache for other thread. Not exactly sure what is going on.. However it got fixed once I used the Unconfined dispatcher or if the underlying pool that is used as dispatcher have the threadpool of size 1.
u

uli

08/10/2018, 7:38 AM
see the main discussion. `await`should take care of visibility of changes. Still glad it is fixed now