WrappedObject's use of UnsafeCell #302
martin-hughes
started this conversation in
General
Replies: 0 comments
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.
-
After #300 I've been trying to convince myself more about the safety of the AML interpreter.
One thing that stands out is the use of
UnsafeCell(partly because of the name 😆). So @IsaacWoods I was wondering why you chose to useUnsafeCellwithinWrappedObjectrather thanRefCellorRwLock?It looks like the need for an interpreter "token" is aiming to cause the user to treat the
WrappedObjectas though it needs to be reader-writer-locked, but without actually enforcing it - is that a correct reading of the code?Beta Was this translation helpful? Give feedback.
All reactions