Skip to content

Commit ee98027

Browse files
committed
mark &mut World and DeferredWorld system params as non-send
1 parent fe71fca commit ee98027

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

crates/bevy_ecs/src/system/system_param.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -1051,7 +1051,6 @@ unsafe impl SystemParam for &'_ World {
10511051
system_meta.archetype_component_access.extend(&access);
10521052

10531053
let mut filtered_access = FilteredAccess::default();
1054-
10551054
filtered_access.read_all();
10561055
if !system_meta
10571056
.component_access_set
@@ -1097,7 +1096,6 @@ unsafe impl<'w> SystemParam for DeferredWorld<'w> {
10971096
system_meta.archetype_component_access.extend(&access);
10981097

10991098
let mut filtered_access = FilteredAccess::default();
1100-
11011099
filtered_access.read_all();
11021100
filtered_access.write_all();
11031101
if !system_meta
@@ -1108,7 +1106,9 @@ unsafe impl<'w> SystemParam for DeferredWorld<'w> {
11081106
panic!("{}", MUT_DEFERRED_WORLD_ERROR);
11091107
}
11101108
system_meta.component_access_set.add(filtered_access);
1109+
11111110
system_meta.set_has_deferred();
1111+
system_meta.set_non_send();
11121112
}
11131113

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

11491149
let mut filtered_access = FilteredAccess::default();
1150-
11511150
filtered_access.read_all();
11521151
filtered_access.write_all();
11531152
if !system_meta
@@ -1158,7 +1157,9 @@ unsafe impl SystemParam for &mut World {
11581157
panic!("{}", MUT_WORLD_ERROR);
11591158
}
11601159
system_meta.component_access_set.add(filtered_access);
1160+
11611161
system_meta.set_has_deferred();
1162+
system_meta.set_non_send();
11621163
}
11631164

11641165
unsafe fn get_param<'world, 'state>(

0 commit comments

Comments
 (0)