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

Remove questionable unsafe impl Send #869

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sholderbach
Copy link
Member

HistoryCompleter is not Send due to it containing a reference to a &dyn History which was only trait History: Send.
Here the property of a type T needing to implement Sync for its &T to be Send comes into play. Thus this unsafe impl Send is unsound.

The change of making trait History: Send + Sync makes HistoryCompleter: Send automatically and should be compatible for all sound implementations.

`HistoryCompleter` is not `Send` due to it containing a reference to a
`&dyn History` which was only `trait History: Send`.
Here the property of a type T needing to implement `Sync` for its `&T`
to be `Send` comes into play. Thus this `unsafe impl Send` is unsound.

The change of making `trait History: Send + Sync` makes
`HistoryCompleter: Send` automatically and should be compatible for all
sound implementations.
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