Skip to content

Conversation

madsmtm
Copy link

@madsmtm madsmtm commented Jun 15, 2021

See comments in the code for reasoning.

The impl for Id<T, Shared> is the same as Arc<T>, the impl for Id<T, Owned> is the same as Box<T> and the impl for WeakId is the same as Id<T, Shared> (because you can get the latter from the former).

See this blog post by nyanpasu64 for more information on this.

madsmtm added 2 commits June 15, 2021 12:34
See comments in the code for reasoning.

The impl for `Id<T, Shared>` is the same as `Arc<T>` and the impl for `Id<T, Owned>` is the same as `Box<T>`.
The implementations follow the same reasoning as `Id<T, Shared>`, since you can upgrade `WeakId` to `Id<T, Shared>`.
@madsmtm madsmtm changed the title Fix Send and Sync implementations on Id Fix Send and Sync implementations on Id and WeakId Jun 15, 2021
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

Successfully merging this pull request may close these issues.

1 participant