Panda3D

Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
Job Class Reference
Inheritance diagram for Job:

## Public Member Functions
| __init__ (self, name)
| destroy (self)
| finished (self)
| getFinishedEvent (self)
| getJobName (self)
| getPriority (self)
| isFinished (self)
| printingBegin (self)
| printingEnd (self)
| resume (self)
| run (self)
| setPriority (self, priority)
| suspend (self)
Public Member Functions inherited from DirectObject
| __init__ (self)
| accept (self, event, method, extraArgs=[])
| acceptOnce (self, event, method, extraArgs=[])
| addTask (self, *args, **kwargs)
| detectLeaks (self)
| doMethodLater (self, *args, **kwargs)
| getAllAccepting (self)
| ignore (self, event)
| ignoreAll (self)
| isAccepting (self, event)
| isIgnoring (self, event)
| removeAllTasks (self)
| removeTask (self, taskOrName)

## Static Public Attributes
| Continue = None
| `yield None` is acceptable in place of `yield Job.Continue`
| Done = object()
| Yielded from the `run()` generator method when the job is done.
| Priorities = ScratchPad(Min=1, Low=100, Normal=1000, High=10000)
| Sleep = object()
| Yield any remaining time for this job until next frame.
Static Public Attributes inherited from DirectObject
| accept_once = acceptOnce
| add_task = addTask
| detect_leaks = detectLeaks
| do_method_later = doMethodLater
| get_all_accepting = getAllAccepting
| ignore_all = ignoreAll
| is_accepting = isAccepting
| is_ignoring = isIgnoring
| remove_all_tasks = removeAllTasks
| remove_task = removeTask

## Protected Member Functions
| _cleanupGenerator (self)
| _getGenerator (self)
| _getJobId (self)
| _setFinished (self)
Protected Member Functions inherited from DirectObject
| _addTask (self, task)
| _clearTask (self, task)

## Protected Attributes
bool | _finished = False
| _generator = None
| _id = Job._SerialGen.next()
| _name = name
bool | _printing = False
| _priority = Job.Priorities.Normal
| _pstats = PStatCollector("App:Show code:jobManager:%s" % self._name)
Protected Attributes inherited from DirectObject
dict | _taskList = {}

## Static Protected Attributes
| _SerialGen = SerialNumGen()

## Detailed Description

    Base class for cpu-intensive or non-time-critical operations that
    are run through the :class:`.JobManager`.

    To use, subclass and override the `run()` method.

## Constructor & Destructor Documentation

## ◆ __init__()

__init__ | ( |  | self,
|  |  | name )

## Member Function Documentation

## ◆ _cleanupGenerator()

_cleanupGenerator | ( |  | self | ) |
| protected

## ◆ _getGenerator()

_getGenerator | ( |  | self | ) |
| protected

## ◆ _getJobId()

_getJobId | ( |  | self | ) |
| protected

## ◆ _setFinished()

_setFinished | ( |  | self | ) |
| protected

## ◆ destroy()

destroy | ( |  | self | ) |

Reimplemented in CheckContainers, ContainerLeakDetector, FindContainers, FPTObjsNamed, FPTObjsOfType, PruneObjectRefs, ContainerReport, GarbageReport, _MessageListenerTypeLeakDetectorCreator, and _MessageTypeLeakDetectorCreator.

## ◆ finished()

finished | ( |  | self | ) |

Reimplemented in FPTObjsNamed, FPTObjsOfType, ContainerReport, GarbageReport, _MessageListenerTypeLeakDetectorCreator, _MessageTypeLeakDetectorCreator, and ReferrerSearch.

## ◆ getFinishedEvent()

getFinishedEvent | ( |  | self | ) |

## ◆ getJobName()

getJobName | ( |  | self | ) |

## ◆ getPriority()

getPriority | ( |  | self | ) |

Reimplemented in CheckContainers, FindContainers, FPTObjsNamed, FPTObjsOfType, and PruneObjectRefs.

## ◆ isFinished()

isFinished | ( |  | self | ) |

## ◆ printingBegin()

printingBegin | ( |  | self | ) |

## ◆ printingEnd()

printingEnd | ( |  | self | ) |

## ◆ resume()

resume | ( |  | self | ) |

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

## ◆ run()

run | ( |  | self | ) |

    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`.

Reimplemented in CheckContainers, ContainerLeakDetector, FindContainers, FPTObjsNamed, FPTObjsOfType, PruneObjectRefs, ContainerReport, GarbageReport, TestJob, _MessageListenerTypeLeakDetectorCreator, _MessageTypeLeakDetectorCreator, MessengerLeakDetector, and ReferrerSearch.

## ◆ setPriority()

setPriority | ( |  | self,
|  |  | priority )

## ◆ suspend()

suspend | ( |  | self | ) |

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

## Member Data Documentation

## ◆ _finished

bool _finished = False
| protected

## ◆ _generator

_generator = None
| protected

## ◆ _id

_id = Job._SerialGen.next()
| protected

## ◆ _name

_name = name
| protected

## ◆ _printing

bool _printing = False
| protected

## ◆ _priority

_priority = Job.Priorities.Normal
| protected

## ◆ _pstats

_pstats = PStatCollector("App:Show code:jobManager:%s" % self._name)
| protected

## ◆ _SerialGen

_SerialGen = SerialNumGen()
| static protected

## ◆ Continue

Continue = None
| static

`yield None` is acceptable in place of `yield Job.Continue`

## ◆ Done

Done = object()
| static

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

## ◆ Priorities

Priorities = ScratchPad(Min=1, Low=100, Normal=1000, High=10000)
| static

## ◆ Sleep

Sleep = object()
| static

Yield any remaining time for this job until next frame.