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

[Merged by Bors] - Allow shared access to SyncCell for types that are already Sync #7718

Closed
wants to merge 3 commits into from

Conversation

JoJoJet
Copy link
Member

@JoJoJet JoJoJet commented Feb 16, 2023

Objective

The type SyncCell<T> (added in #5483) is used to force any wrapped type to be Sync, by only allowing exclusive access to the wrapped value. This restriction is unnecessary for types which are already Sync.


Changelog

  • Added the method read to SyncCell, which allows shared access to values that already implement the Sync trait.

@JoJoJet JoJoJet added C-Feature A new feature, making something new possible A-Utils Utility functions and types labels Feb 16, 2023
@james7132 james7132 added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Feb 16, 2023
Copy link
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

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

bors r+

bors bot pushed a commit that referenced this pull request Feb 17, 2023
…7718)

# Objective

The type `SyncCell<T>` (added in #5483) is used to force any wrapped type to be `Sync`, by only allowing exclusive access to the wrapped value. This restriction is unnecessary for types which are already `Sync`.

---

## Changelog

+ Added the method `read` to `SyncCell`, which allows shared access to values that already implement the `Sync` trait.
@bors bors bot changed the title Allow shared access to SyncCell for types that are already Sync [Merged by Bors] - Allow shared access to SyncCell for types that are already Sync Feb 17, 2023
@bors bors bot closed this Feb 17, 2023
@JoJoJet JoJoJet deleted the sync-cell-read branch February 17, 2023 00:57
myreprise1 pushed a commit to myreprise1/bevy that referenced this pull request Feb 18, 2023
…evyengine#7718)

# Objective

The type `SyncCell<T>` (added in bevyengine#5483) is used to force any wrapped type to be `Sync`, by only allowing exclusive access to the wrapped value. This restriction is unnecessary for types which are already `Sync`.

---

## Changelog

+ Added the method `read` to `SyncCell`, which allows shared access to values that already implement the `Sync` trait.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Utils Utility functions and types C-Feature A new feature, making something new possible S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants