direct.showbase.Job

from direct.showbase.Job import Job, TestJob, addTestJob

Inheritance diagram

Inheritance diagram of direct.showbase.Job

class Job(name)[source]

Bases: 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 of yield Job.Continue

Done = <object object>

Yielded from the run() generator method when the job is done.

Priorities = <direct.showbase.PythonUtil.ScratchPad object>
Sleep = <object object>

Yield any remaining time for this job until next frame.

__init__(name)[source]
destroy()[source]
finished()[source]
getFinishedEvent()[source]
getJobName()[source]
getPriority()[source]
isFinished()[source]
printingBegin()[source]
printingEnd()[source]
resume()[source]

Called every time JobManager is going to start running this job.

run()[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.

setPriority(priority)[source]
suspend()[source]

Called when JobManager is going to stop running this job for a while.

class TestJob[source]

Bases: Job

__init__()[source]
run()[source]
addTestJob()[source]