direct.showbase.Job¶
from direct.showbase.Job import Job, TestJob, addTestJob
Inheritance diagram
-
class
Job
(name)[source]¶ Bases:
direct.showbase.DirectObject.DirectObject
Base class for cpu-intensive or non-time-critical operations that are run through the
JobManager
.To use, subclass and override the
run()
method.-
Continue
= None¶ yield None
is acceptable in place ofyield Job.Continue
-
Priorities
= <direct.showbase.PythonUtil.ScratchPad object>¶
-
Sleep
= <object object>¶ Yield any remaining time for this job until next frame.
-
run
(self)[source]¶ This should be overridden with a generator that does the needful processing.
yield
Job.Continue
when possible/reasonable, and try not to run longer than the JobManager’s timeslice between yields.When done, yield
Job.Done
.
-