bevy/crates/bevy_utils
James Liu 9dde99fb96
Cleanup the multithreaded executor (#12969)
# Objective
Improve the code quality of the multithreaded executor.

## Solution
 * Remove some unused variables.
 * Use `Mutex::get_mut` where applicable instead of locking.
* Use a `startup_systems` FixedBitset to pre-compute the starting
systems instead of building it bit-by-bit on startup.
* Instead of using `FixedBitset::clear` and `FixedBitset::union_with`,
use `FixedBitset::clone_from` instead, which does only a single copy and
will not allocate if the target bitset has a large enough allocation.
* Replace the `Mutex` around `Conditions` with `SyncUnsafeCell`, and add
a `Context::try_lock` that forces it to be synchronized fetched
alongside the executor lock.

This might produce minimal performance gains, but the focus here is on
the code quality improvements.
2024-04-16 02:37:19 +00:00
..
macros Add repository field to bevy_utils_proc_macros (#12808) 2024-03-31 09:58:16 +00:00
src Cleanup the multithreaded executor (#12969) 2024-04-16 02:37:19 +00:00
Cargo.toml Make feature(doc_auto_cfg) work (#12642) 2024-03-23 02:22:52 +00:00
Readme.md add and fix shields in Readmes (#9993) 2023-10-15 00:52:31 +00:00

Bevy Utils

License Crates.io Downloads Docs Discord

A Collection of Utilities for the Bevy Engine.