Skip to content

Remove parking_lot from bevy_asset and bevy_macro_utils #18996

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

bushrat011899
Copy link
Contributor

Objective

Solution

  • Removed parking_lot from bevy_asset and switched to bevy_platform::sync internally.
  • Removed parking_lot from bevy_macro_utils and switched to std::sync internally. Also added a simple alternative to mapped RwLock guards while the feature is nightly-only.

Testing

  • CI

Notes

It is possible there is a performance change here, but I believe it will be negligible due to performance improvements in std since Bevy adopted parking_lot in #210. If there is a performance difference noticed, I believe the more appropriate course of action would be to move parking_lot into bevy_platform as a feature, so that all parts of Bevy could benefit, not just bevy_asset.

@bushrat011899 bushrat011899 added A-Assets Load files from disk to use for things like images, models, and sounds C-Dependencies A change to the crates that Bevy depends on D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward O-Embedded Weird hardware and no_std platforms labels Apr 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Assets Load files from disk to use for things like images, models, and sounds C-Dependencies A change to the crates that Bevy depends on D-Straightforward Simple bug fixes and API improvements, docs, test and examples O-Embedded Weird hardware and no_std platforms S-Needs-Review Needs reviewer attention (from anyone!) to move forward
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant