diff --git a/src/runtime2/branch.rs b/src/runtime2/branch.rs index cb605fd86e7df443c8f41bf660a1d411bebcd52c..8f156102d6828c75c8a77f8b7bdb5dc15b3f46c8 100644 --- a/src/runtime2/branch.rs +++ b/src/runtime2/branch.rs @@ -283,7 +283,7 @@ impl ExecTree { /// using the provided branch as the final sync result. pub fn end_sync(&mut self, branch_id: BranchId) { debug_assert!(self.is_in_sync()); - debug_assert!(self.iter_queue(QueueKind::FinishedSync).any(|v| v.id == branch_id)); + debug_assert!(self.iter_queue(QueueKind::FinishedSync, None).any(|v| v.id == branch_id)); // Swap indicated branch into the first position self.branches.swap(0, branch_id.index as usize); @@ -294,7 +294,10 @@ impl ExecTree { branch.id = BranchId::new_invalid(); branch.parent_id = BranchId::new_invalid(); branch.sync_state = SpeculativeState::RunningNonSync; + debug_assert!(!branch.awaiting_port.is_valid()); branch.next_in_queue = BranchId::new_invalid(); + branch.inbox.clear(); + debug_assert!(branch.prepared_channel.is_none()); // Clear out all the queues for queue_idx in 0..NUM_QUEUES {