async fn process_queued_systems(&mut self) {
        #[cfg(test)]
        let mut started_systems = 0;
        for index in self.queued.ones() {
            // If the system shouldn't actually run this iteration, process it as completed
            // immediately; otherwise, check for conflicts and signal its task to start.
            let system_metadata = &self.system_metadata[index];
            if !self.should_run[index] {
                self.dependants_scratch.extend(&system_metadata.dependants);
            } else if self.can_start_now(index) {
                #[cfg(test)]
                {
                    started_systems += 1;
                }
                system_metadata
                    .start_sender
                    .send(())
                    .await
                    .unwrap_or_else(|error| unreachable!(error));
                self.running.set(index, true);
                if !system_metadata.is_send {
                    self.non_send_running = true;
                }
                // Add this system's access information to the active access information.
                self.active_archetype_component_access
                    .extend(&system_metadata.archetype_component_access);
            }
        }
        #[cfg(test)]
        if started_systems != 0 {
            self.emit_event(StartedSystems(started_systems));
        }
        // Remove now running systems from the queue.
        self.queued.difference_with(&self.running);
        // Remove immediately processed systems from the queue.
        self.queued.intersect_with(&self.should_run);
    }
/// Starts all non-conflicting queued systems, moves them from `queued` to `running`,
/// adds their access information to active access information;
/// processes queued systems that shouldn't run this iteration as completed immediately.
Starts all non-conflicting queued systems, moves them from `queued` to `running`,
adds their access information to active access information;
processes queued systems that shouldn't run this iteration as completed immediately.
Starts all non - conflicting queued systems moves them from ` queued ` to ` running ` adds their access information to active access information ; processes queued systems that shouldn ' t run this iteration as completed immediately .
async fn process_queued_systems(&mut self) {
        #[cfg(test)]
        let mut started_systems = 0;
        for index in self.queued.ones() {
            // If the system shouldn't actually run this iteration, process it as completed
            // immediately; otherwise, check for conflicts and signal its task to start.
            let system_metadata = &self.system_metadata[index];
            if !self.should_run[index] {
                self.dependants_scratch.extend(&system_metadata.dependants);
            } else if self.can_start_now(index) {
                #[cfg(test)]
                {
                    started_systems += 1;
                }
                system_metadata
                    .start_sender
                    .send(())
                    .await
                    .unwrap_or_else(|error| unreachable!(error));
                self.running.set(index, true);
                if !system_metadata.is_send {
                    self.non_send_running = true;
                }
                // Add this system's access information to the active access information.
                self.active_archetype_component_access
                    .extend(&system_metadata.archetype_component_access);
            }
        }
        #[cfg(test)]
        if started_systems != 0 {
            self.emit_event(StartedSystems(started_systems));
        }
        // Remove now running systems from the queue.
        self.queued.difference_with(&self.running);
        // Remove immediately processed systems from the queue.
        self.queued.intersect_with(&self.should_run);
    }
async fn process_queued_systems ( & mut self ) { # [ cfg ( test ) ] let mut started_systems = 0 ; for index in self . queued . ones ( ) { // If the system shouldn't actually run this iteration, process it as completed // immediately; otherwise, check for conflicts and signal its task to start. let system_metadata = & self . system_metadata [ index ] ; if ! self . should_run [ index ] { self . dependants_scratch . extend ( & system_metadata . dependants ) ; } else if self . can_start_now ( index ) { # [ cfg ( test ) ] { started_systems += 1 ; } system_metadata . start_sender . send ( ( ) ) . await . unwrap_or_else ( | error | unreachable ! ( error ) ) ; self . running . set ( index , true ) ; if ! system_metadata . is_send { self . non_send_running = true ; } // Add this system's access information to the active access information. self . active_archetype_component_access . extend ( & system_metadata . archetype_component_access ) ; } } # [ cfg ( test ) ] if started_systems != 0 { self . emit_event ( StartedSystems ( started_systems ) ) ; } // Remove now running systems from the queue. self . queued . difference_with ( & self . running ) ; // Remove immediately processed systems from the queue. self . queued . intersect_with ( & self . should_run ) ; }
Starts all non-conflicting queued systems, moves them from `queued` to `running`,
adds their access information to active access information;
processes queued systems that shouldn't run this iteration as completed immediately.
Starts all non - conflicting queued systems moves them from ` queued ` to ` running ` adds their access information to active access information ; processes queued systems that shouldn ' t run this iteration as completed immediately .
&mut self
&mut self