Sam Schilling
01/22/2020, 10:16 PMclass Foo {
var bar = arrayOf(...)
}
var foo = Foo()
GlobalScope.launch {
if (foo.bar.contains(...)) { ... }
}
// Once above coroutine is reached, any attempts to mutate foo.bar fail since it is frozen
Sam Schilling
01/22/2020, 10:48 PMDetachedObjectGraph
but not sure how I would integrate that with my use case. Any example usages that might be helpful?kpgalligan
01/22/2020, 11:25 PMkpgalligan
01/22/2020, 11:27 PMbar
mutable, then you need to transfer it, which means DetachedObjectGraph
, but this seems like a non-specific example. We never use DetachedObjectGraph
in any production code. There’s usually a different way to architect things.