You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is needed to wrap external libraries with reference counted but not inherently thread-safe types, and could be used to implemented a reference counted pointer as a library feature. It prevents the type from being sendable, and it could only allow Owned types to be contained in it, preventing cycles from ever occurring.
The #[non_const] attribute is needed to make Cell safe if we were using llvm.invariant intrinsics on frozen Const types, and for mutable reference counted pointers.
For now I've worked around the issue for reference counted pointers by making them contain Option<@()> and Option<@mut ()> and just setting those to None.
The text was updated successfully, but these errors were encountered:
To provide a reference counted pointer type with deterministic
destruction once managed boxes are switched over to a garbage
collector. Unlike managed boxes, these can be moved instead of just
copied/cloned which is helpful for avoiding reference counts.
Needs #5601 to be fixed in order for safety to be provided without the current ugly workaround of making the pointers contain `Option<@()>` and `Option<@mut ()>` (which are just set to `None`).
@brson: r?
This is needed to wrap external libraries with reference counted but not inherently thread-safe types, and could be used to implemented a reference counted pointer as a library feature. It prevents the type from being sendable, and it could only allow
Owned
types to be contained in it, preventing cycles from ever occurring.The
#[non_const]
attribute is needed to makeCell
safe if we were usingllvm.invariant
intrinsics on frozenConst
types, and for mutable reference counted pointers.For now I've worked around the issue for reference counted pointers by making them contain
Option<@()>
andOption<@mut ()>
and just setting those toNone
.The text was updated successfully, but these errors were encountered: