Replies: 1 comment 1 reply
-
I think it was discussed previously, e.g. here #546 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Following #546 (reply in thread)
Let's say that I have 2 depth of UserData like:
If you have a
Arc<Mutex<A>>
and that you want to modify the field c you would do something like:BUT, this actually won't work, because what is happening behind the scene is
__index
inga
withb
, BUT you're__newindex
ingb
with - therefore - the clonedb
.Therefore, it won't work. And even more than that, it will clone some unnecessary data that is not needed in this case.
Do any of you have a clean solution for this ?
Minimal example:
Beta Was this translation helpful? Give feedback.
All reactions