mirror of
https://github.com/bevyengine/bevy
synced 2024-12-22 19:13:08 +00:00
05afbc6815
# Objective Currently, `Local` has a `Sync` bound. Theoretically this is unnecessary as a local can only ever be accessed from its own system, ensuring exclusive access on one thread. This PR removes this restriction. ## Solution - By removing the `Resource` bound from `Local` and adding the new `SyncCell` threading primative, `Local` can have the `Sync` bound removed. ## Changelog ### Added - Added `SyncCell` to `bevy_utils` ### Changed - Removed `Resource` bound from `Local` - `Local` is now wrapped in a `SyncCell` ## Migration Guide - Any code relying on `Local<T>` having `T: Resource` may have to be changed, but this is unlikely. Co-authored-by: PROMETHIA-27 <42193387+PROMETHIA-27@users.noreply.github.com> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |