bevy/crates/bevy_reflect/src
Zachary Harrold 450328d15e
Replaced parking_lot with std::sync (#9545)
# Objective

- Fixes #4610 

## Solution

- Replaced all instances of `parking_lot` locks with equivalents from
`std::sync`. Acquiring locks within `std::sync` can fail, so
`.expect("Lock Poisoned")` statements were added where required.

## Comments

In [this
comment](https://github.com/bevyengine/bevy/issues/4610#issuecomment-1592407881),
the lack of deadlock detection was mentioned as a potential reason to
not make this change. From what I can gather, Bevy doesn't appear to be
using this functionality within the engine. Unless it was expected that
a Bevy consumer was expected to enable and use this functionality, it
appears to be a feature lost without consequence.

Unfortunately, `cpal` and `wgpu` both still rely on `parking_lot`,
leaving it in the dependency graph even after this change.

From my basic experimentation, this change doesn't appear to have any
performance impacts, positive or negative. I tested this using
`bevymark` with 50,000 entities and observed 20ms of frame-time before
and after the change. More extensive testing with larger/real projects
should probably be done.
2023-10-02 12:44:34 +00:00
..
enums bevy_reflect: FromReflect Ergonomics Implementation (#6056) 2023-06-29 01:31:34 +00:00
impls Bevy Asset V2 (#8624) 2023-09-07 02:07:27 +00:00
path Fix some nightly warnings (#9672) 2023-09-02 18:35:06 +00:00
serde Remove useless single tuples and trailing commas (#9720) 2023-09-08 21:46:54 +00:00
array.rs Fix typos throughout the project (#9090) 2023-07-10 00:11:51 +00:00
fields.rs bevy_reflect: Reflect doc comments (#6234) 2022-10-18 13:49:57 +00:00
from_reflect.rs Fix typos throughout the project (#9090) 2023-07-10 00:11:51 +00:00
lib.rs Add TypePath to the prelude (#9963) 2023-09-29 08:27:30 +00:00
list.rs Fix typos throughout the project (#9090) 2023-07-10 00:11:51 +00:00
map.rs Fix CI for Rust 1.72 (#9562) 2023-08-25 12:34:24 +00:00
reflect.rs Reflect now requires DynamicTypePath. Remove Reflect::get_type_path() (#8764) 2023-06-06 17:23:58 +00:00
std_traits.rs fix nightly clippy warnings (#6395) 2022-10-28 21:03:01 +00:00
struct_trait.rs Fix CI for Rust 1.72 (#9562) 2023-08-25 12:34:24 +00:00
tuple_struct.rs Reflect now requires DynamicTypePath. Remove Reflect::get_type_path() (#8764) 2023-06-06 17:23:58 +00:00
tuple.rs Reflect now requires DynamicTypePath. Remove Reflect::get_type_path() (#8764) 2023-06-06 17:23:58 +00:00
type_info.rs Reflect now requires DynamicTypePath. Remove Reflect::get_type_path() (#8764) 2023-06-06 17:23:58 +00:00
type_path.rs Fix typos throughout the project (#9090) 2023-07-10 00:11:51 +00:00
type_registry.rs Replaced parking_lot with std::sync (#9545) 2023-10-02 12:44:34 +00:00
type_uuid_impl.rs implement TypeUuid for primitives and fix multiple-parameter generics having the same TypeUuid (#6633) 2023-02-16 17:09:44 +00:00
type_uuid.rs implement TypeUuid for primitives and fix multiple-parameter generics having the same TypeUuid (#6633) 2023-02-16 17:09:44 +00:00
utility.rs Replaced parking_lot with std::sync (#9545) 2023-10-02 12:44:34 +00:00