bevy/crates/bevy_render/src/render_resource
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
..
batched_uniform_buffer.rs Automatic batching/instancing of draw commands (#9685) 2023-09-21 22:12:34 +00:00
bind_group_layout.rs Replace UUID based IDs with a atomic-counted ones (#6988) 2022-12-25 00:23:15 +00:00
bind_group.rs Use a single line for of large binding lists (#9849) 2023-09-19 22:17:44 +00:00
buffer_vec.rs Use instancing for sprites (#9597) 2023-09-02 18:03:19 +00:00
buffer.rs Replace UUID based IDs with a atomic-counted ones (#6988) 2022-12-25 00:23:15 +00:00
gpu_array_buffer.rs Automatic batching/instancing of draw commands (#9685) 2023-09-21 22:12:34 +00:00
mod.rs Add GpuArrayBuffer and BatchedUniformBuffer (#8204) 2023-07-21 16:46:56 +00:00
pipeline_cache.rs Replaced parking_lot with std::sync (#9545) 2023-10-02 12:44:34 +00:00
pipeline_specializer.rs added multi-line string formatting (#8350) 2023-04-13 18:00:17 +00:00
pipeline.rs Add push contant config to layout (#7681) 2023-02-17 06:20:16 +00:00
resource_macros.rs remove potential ub in render_resource_wrapper (#7279) 2023-02-06 17:14:00 +00:00
shader.rs Fix the clippy::explicit_iter_loop lint (#9834) 2023-09-19 03:35:22 +00:00
storage_buffer.rs Add GpuArrayBuffer and BatchedUniformBuffer (#8204) 2023-07-21 16:46:56 +00:00
texture.rs Add screenshot api (#7163) 2023-04-19 21:28:42 +00:00
uniform_buffer.rs Directly copy data into uniform buffers (#9865) 2023-09-25 19:15:37 +00:00