Skip to content

Commit

Permalink
break from outer loop
Browse files Browse the repository at this point in the history
  • Loading branch information
apfitzge committed Dec 31, 2024
1 parent 3f488bd commit 02604da
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,8 @@ impl<Tx: TransactionWithMeta> PrioGraphScheduler<Tx> {
let mut num_scheduled: usize = 0;
let mut num_sent: usize = 0;
let mut num_unschedulable: usize = 0;
while num_scheduled < self.config.max_transactions_per_scheduling_pass {
'outer_schedule_loop: while num_scheduled < self.config.max_transactions_per_scheduling_pass
{
// If nothing is in the main-queue of the `PrioGraph` then there's nothing left to schedule.
if self.prio_graph.is_empty() {
break;
Expand Down Expand Up @@ -264,12 +265,12 @@ impl<Tx: TransactionWithMeta> PrioGraphScheduler<Tx> {
{
schedulable_threads.remove(thread_id);
if schedulable_threads.is_empty() {
break;
break 'outer_schedule_loop;
}
}

if num_scheduled >= self.config.max_transactions_per_scheduling_pass {
break;
break 'outer_schedule_loop;
}
}
}
Expand Down

0 comments on commit 02604da

Please sign in to comment.