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
Would it be possible to add a weak reference type to this library that doesn't include a lifetime parameter?
I've been trying to create something similar to "Box" but with thread-safe weak pointers;
or "Arc" but with the ability to into_inner and get the original value out.
Your library almost satisfies my requirements, but the lifetime requirement on the AtomicRef was problematic.
Note that in my partial-implementation, the into_inner function can block until the weak references aren't actively borrowing. Not sure how this behavior would be accomplished in your library.
The text was updated successfully, but these errors were encountered:
Would it be possible to add a weak reference type to this library that doesn't include a lifetime parameter?
I've been trying to create something similar to "Box" but with thread-safe weak pointers;
or "Arc" but with the ability to
into_inner
and get the original value out.Your library almost satisfies my requirements, but the lifetime requirement on the
AtomicRef
was problematic.For reference:
https://www.reddit.com/r/rust/comments/1aq8zzf/help_implementing_an_atomic_reference_box_type/
Note that in my partial-implementation, the
into_inner
function can block until the weak references aren't actively borrowing. Not sure how this behavior would be accomplished in your library.The text was updated successfully, but these errors were encountered: