You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
par_for_each and par_for_each_mut app freeze with 100% CPU usage if an invalid batch_size is passed #6640
While running a parallel query, I accidentally passed an invalid value of 0 as batch_size.
What went wrong
This caused my application to freeze forever and apparently consume a lot of resources (I even got a blue screen of death, but I'm not sure if it was just a coincidence since it happened only once. While my application was frozen, the application was reported as using 100% CPU on the task manager.
I was expecting a panic on a clearly wrong batch_size passed as input.
Additional information
You can easily reproduce this with this application:
use bevy::prelude::{App, Transform};
fn main() {
let mut app = App::new();
app.world.spawn(Transform::default());
app.update();
let mut query = app.world.query::<(&Transform,)>();
query.par_for_each(&app.world, 0, |t| {
})
}
Activity
Basic adaptive batching for parallel query iteration (#4777)
Basic adaptive batching for parallel query iteration (bevyengine#4777)
Basic adaptive batching for parallel query iteration (bevyengine#4777)
Squashed commit of the following: