from direct.showbase.Job import Job, TestJob, addTestJob
- class Job(name)¶
Base class for cpu-intensive or non-time-critical operations that are run through the
To use, subclass and override the
- Continue = None¶
yield Noneis acceptable in place of
- Priorities = <direct.showbase.PythonUtil.ScratchPad object>¶
- Sleep = <object object>¶
Yield any remaining time for this job until next frame.
- __init__(self, name)¶
Called every time JobManager is going to start running this job.
This should be overridden with a generator that does the needful processing.
Job.Continuewhen possible/reasonable, and try not to run longer than the JobManager’s timeslice between yields.
When done, yield
- setPriority(self, priority)¶
Called when JobManager is going to stop running this job for a while.