Skip to content

Commit

Permalink
Preserved job queue currant index after pushing a job. (#1781)
Browse files Browse the repository at this point in the history
* Peserved job queue current index after pushing a job.

* Reconciled the heinous offense of using tabs.
  • Loading branch information
Pherring04 authored Sep 26, 2024
1 parent 1a842a6 commit c9cec71
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ int Trick::ScheduledJobQueue::push( JobData * new_job ) {

/* Increment the size of the queue */
list_size++ ;

int new_job_index = (insert_pt - list) / sizeof(JobData**);
if(new_job_index < curr_index) {
curr_index++;
}

return(0) ;

Expand Down

0 comments on commit c9cec71

Please sign in to comment.