has't any owners now then. Makes sense?
Are there some example manually
detach
and
attach
in more real usecases?
k
kpgalligan
05/26/2019, 6:23 PM
" It’s that the object is either owned by a single worker.” To be precise, mutable (non-frozen) state can be visible to only one thread. A worker runs operations in its own thread, but you’re not always inside a “worker”.
kpgalligan
05/26/2019, 6:24 PM
“Can I create the object in a worker then detach it and transfer to other a worker?” Yes, but the same rules apply. You need to pass it to the other worker’s producer without that reference still being available in the caller. An example of what you’re thinking would help. I can point out what won’t work
kpgalligan
05/26/2019, 6:25 PM
“Why need
DetachedObjectGraph
in
detach()
test?
SomeData
has’t any owners now then. Makes sense?” I don’t really understand what you’re asking.
kpgalligan
05/26/2019, 6:26 PM
“Are there some example manually
detach
and
attach
in more real usecases?” I don’t have many. I don’t use detach much (I point that out in the article)