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

Mark InnerPicture as Send+Sync #96

Merged
merged 3 commits into from
Mar 27, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -413,8 +413,6 @@ impl Decoder {
} else {
let inner = InnerPicture { pic };
Ok(Picture {
// https://github.com/rust-av/dav1d-rs/issues/95
#[allow(clippy::arc_with_non_send_sync)]
inner: Arc::new(inner),
})
}
Expand Down Expand Up @@ -734,6 +732,9 @@ impl Picture {
unsafe impl Send for Picture {}
unsafe impl Sync for Picture {}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lu-zero Do you want this to be removed and implicitly implemented? Same question for Plane.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds a good idea. Thank you :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So remove? Do you want to add something around static_assertions to ensure the traits are auto-implemented? :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you prefer, the least code to confuse users the better though ^^

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!


unsafe impl Send for InnerPicture {}
unsafe impl Sync for InnerPicture {}

impl Drop for InnerPicture {
fn drop(&mut self) {
unsafe {
Expand Down
Loading