give timeslices to newly-added jobs right away

This commit is contained in:
Darren Ranalli 2007-04-19 10:14:55 +00:00
parent 301c6d9aea
commit 5e208f23e8

View File

@ -51,6 +51,8 @@ class JobManager:
self._pri2jobIds[pri].append(jobId) self._pri2jobIds[pri].append(jobId)
# record the job's relative timeslice count # record the job's relative timeslice count
self._jobId2timeslices[jobId] = pri self._jobId2timeslices[jobId] = pri
# reset the jobId round-robin
self._jobIdGenerator = None
if len(self._jobId2pri) == 1: if len(self._jobId2pri) == 1:
taskMgr.add(self._process, JobManager.TaskName) taskMgr.add(self._process, JobManager.TaskName)
self._highestPriority = pri self._highestPriority = pri