Skip to content

Commit

Permalink
mark &mut World and DeferredWorld system params as non-send
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsDoot committed Jan 30, 2025
1 parent fe71fca commit ee98027
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions crates/bevy_ecs/src/system/system_param.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1051,7 +1051,6 @@ unsafe impl SystemParam for &'_ World {
system_meta.archetype_component_access.extend(&access);

let mut filtered_access = FilteredAccess::default();

filtered_access.read_all();
if !system_meta
.component_access_set
Expand Down Expand Up @@ -1097,7 +1096,6 @@ unsafe impl<'w> SystemParam for DeferredWorld<'w> {
system_meta.archetype_component_access.extend(&access);

let mut filtered_access = FilteredAccess::default();

filtered_access.read_all();
filtered_access.write_all();
if !system_meta
Expand All @@ -1108,7 +1106,9 @@ unsafe impl<'w> SystemParam for DeferredWorld<'w> {
panic!("{}", MUT_DEFERRED_WORLD_ERROR);
}
system_meta.component_access_set.add(filtered_access);

system_meta.set_has_deferred();
system_meta.set_non_send();
}

unsafe fn get_param<'world, 'state>(
Expand Down Expand Up @@ -1147,7 +1147,6 @@ unsafe impl SystemParam for &mut World {
system_meta.archetype_component_access.extend(&access);

let mut filtered_access = FilteredAccess::default();

filtered_access.read_all();
filtered_access.write_all();
if !system_meta
Expand All @@ -1158,7 +1157,9 @@ unsafe impl SystemParam for &mut World {
panic!("{}", MUT_WORLD_ERROR);
}
system_meta.component_access_set.add(filtered_access);

system_meta.set_has_deferred();
system_meta.set_non_send();
}

unsafe fn get_param<'world, 'state>(
Expand Down

0 comments on commit ee98027

Please sign in to comment.