Skip to content

Commit

Permalink
Merge pull request #16224 from donaldsharp/zebra_dplane_event_loop_st…
Browse files Browse the repository at this point in the history
…arvation

zebra: Prevent starvation in dplane_thread_loop
  • Loading branch information
ton31337 authored Jun 19, 2024
2 parents 86d2466 + 6faad86 commit 64112ed
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions zebra/zebra_dplane.c
Original file line number Diff line number Diff line change
Expand Up @@ -7446,6 +7446,11 @@ static void dplane_thread_loop(struct event *event)
zlog_debug("dplane dequeues %d completed work from provider %s",
counter, dplane_provider_get_name(prov));

if (event_should_yield(event)) {
reschedule = true;
break;
}

/* Locate next provider */
prov = dplane_prov_list_next(&zdplane_info.dg_providers, prov);
}
Expand Down

0 comments on commit 64112ed

Please sign in to comment.