Skip to content

Commit

Permalink
fix scheduling
Browse files Browse the repository at this point in the history
  • Loading branch information
xiazhvera committed Dec 16, 2024
1 parent 7191f68 commit 620eb2c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions source/darwin/dispatch_queue_event_loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,8 @@ static void end_iteration(struct scheduled_service_entry *entry) {
s_lock_cross_thread_data(dispatch_loop);
dispatch_loop->synced_cross_thread_data.is_executing = false;

// Remove the node before do scheduling so we didnt consider the entry itself
aws_linked_list_remove(&entry->node);
// if there are any cross-thread tasks, reschedule an iteration for now
if (!aws_linked_list_empty(&dispatch_loop->synced_cross_thread_data.cross_thread_tasks)) {
// added during service which means nothing was scheduled because will_schedule was true
Expand Down

0 comments on commit 620eb2c

Please sign in to comment.