mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
give timeslices to newly-added jobs right away
This commit is contained in:
parent
301c6d9aea
commit
5e208f23e8
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user