-
Notifications
You must be signed in to change notification settings - Fork 13.3k
rename Owned to Send #6496
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
Comments
Note: it used to be called Send |
@graydon: yup, I think the old name was better :) I wasn't around when it was changed, so I don't know if naming it |
Do the various clients even want the same semantics? It's being used in some places (e.g. for ruling out cycles) that have nothing to do with tasks. Maybe some of them actually do want "single ownership of whole tree" and not just "safe to send between tasks"? |
@glehel: the places using it to rule out cycles don't really care what it means, only that they can mark themselves as |
This landed as part of #7451. |
ci: test cargo clippy --fix -Zunstable-options Make sure we catch cases like rust-lang/rust-clippy#6487 in CI in the future. --- *Please write a short comment explaining your change (or "none" for internal only changes)* changelog: none
Types with the
Owned
kind are sendable, and those without it are not sendable. It does not represent ownership because a shared ownership type like those instd::arc
have to beOwned
if they're intended to be sendable.I think this is going to confuse people and lead to bugs. It's tempting to treat
Owned
as meaning the types are owned, but that ends up treating ARCs incorrectly.The text was updated successfully, but these errors were encountered: