diff --git a/crates/bevy_ecs/src/event.rs b/crates/bevy_ecs/src/event.rs index 7e2284dd4850a..8b25ab2a2cbc8 100644 --- a/crates/bevy_ecs/src/event.rs +++ b/crates/bevy_ecs/src/event.rs @@ -407,6 +407,11 @@ impl DerefMut for EventSequence { } /// Reads events of type `T` in order and tracks which events have already been read. +/// +/// # Concurrency +/// +/// Unlike [`EventWriter`], systems with `EventReader` param can be executed concurrently +/// (but not concurrently with `EventWriter` systems for the same event type). #[derive(SystemParam, Debug)] pub struct EventReader<'w, 's, E: Event> { reader: Local<'s, ManualEventReader>, @@ -484,7 +489,12 @@ impl<'w, 's, E: Event> EventReader<'w, 's, E> { /// # bevy_ecs::system::assert_is_system(my_system); /// ``` /// -/// # Limitations +/// # Concurrency +/// +/// `EventWriter` param has [`ResMut>`](Events) inside. So two systems declaring `EventWriter` params +/// for the same event type won't be executed concurrently. +/// +/// # Untyped events /// /// `EventWriter` can only send events of one specific type, which must be known at compile-time. /// This is not a problem most of the time, but you may find a situation where you cannot know