Peserved job queue current index after pushing a job.

This commit is contained in:
Patrick Herrington 2024-09-16 12:38:49 -05:00
parent cca503a6ec
commit 52ddb43318

View File

@ -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) ;