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

statically assert public wgpu types appropriately implement Send and Sync #3025

Merged
merged 1 commit into from
Sep 16, 2022

Conversation

i509VCB
Copy link
Contributor

@i509VCB i509VCB commented Sep 15, 2022

Checklist

  • Run cargo clippy.
  • Run RUSTFLAGS=--cfg=web_sys_unstable_apis cargo clippy --target wasm32-unknown-unknown if applicable.
  • Add change to CHANGELOG.md. See simple instructions inside file.

Connections
#3026

Description
Although we still have some gaps and disagreements between Web and Native whether some types are Send + Sync and a few safety concerns, this pull request should help prevent accidentally making types no longer Send + Sync when the types should be and vice versa.

Testing
Since we use the static_assertions crate, compilation will fail if a type accidentally changes whether it is Send and or Sync.

Copy link
Member

@jimblandy jimblandy left a comment

Choose a reason for hiding this comment

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

This looks fine, except for the FIXMEs. Thank you!

wgpu/src/lib.rs Outdated Show resolved Hide resolved
…Sync

Although we still have some gaps and disagreements between Web and Native whether some types are Send + Sync and a few safety concerns, this pull request should help prevent accidentally making types no longer Send + Sync when the types should be and vice versa.
@i509VCB i509VCB force-pushed the wgpu-send-sync-tests branch from 205904d to 9b53e96 Compare September 16, 2022 01:49
@cwfitzgerald cwfitzgerald merged commit b752c7d into gfx-rs:master Sep 16, 2022
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.

3 participants