addJob method

void addJob(
  1. Job job
)

Adds a job to the manager and attempts to execute it if possible.

Implementation

void addJob(Job job) {
  // Add the job to the pending jobs map.
  _pendingJobs[job.index] = job;

  // Attempt to execute jobs starting from the current index.
  _tryExecuteJobs();
}