Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sendable Weak Reference #3

Open
gftea opened this issue Apr 25, 2023 · 3 comments
Open

sendable Weak Reference #3

gftea opened this issue Apr 25, 2023 · 3 comments

Comments

@gftea
Copy link

gftea commented Apr 25, 2023

Hi,

it seems there is no sendable Weak reference?

@hniksic
Copy link
Owner

hniksic commented Apr 25, 2023

There isn't (they weren't needed for the use case this crate was developed for), but I believe one could be added in a straightforward way.

@gftea
Copy link
Author

gftea commented Apr 25, 2023

When we have a cyclic data structure, which T has a field with weak reference to itself, then we need a SendWeak to make SendRc sendable

@hniksic
Copy link
Owner

hniksic commented Apr 25, 2023

That makes sense. Do you use SendRc in production, or plan to do so? Do you find it useful?

I could look into adding support for weak references, but would only do that if it will be of practical use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants