Panda3D
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
TaskThreaded Class Reference

Public Member Functions

 __init__ (self, name, threaded=True, timeslice=None, callback=None)
 
 destroy (self)
 
 finished (self)
 
 getTimeslice (self)
 
 scheduleCallback (self, callback)
 
 scheduleThread (self, thread)
 
 setTimeslice (self, timeslice)
 
 taskTimeLeft (self)
 

Static Public Attributes

 notify = directNotify.newCategory("TaskThreaded")
 

Protected Member Functions

 _doCallback (self, callback, taskName, task)
 
 _doThreadCallback (self, thread, taskName, task)
 

Protected Attributes

 _callback
 
 _doThreadCallback
 
 _taskStartTime
 

Static Protected Attributes

 _Serial = SerialNumGen()
 

Detailed Description

 derive from this if you need to do a bunch of CPU-intensive
processing and you don't want to hang up the show. Lets you break
up the processing over multiple frames 

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
name,
threaded = True,
timeslice = None,
callback = None )

Member Function Documentation

◆ _doCallback()

_doCallback ( self,
callback,
taskName,
task )
protected

◆ _doThreadCallback()

_doThreadCallback ( self,
thread,
taskName,
task )
protected

◆ destroy()

destroy ( self)

◆ finished()

finished ( self)

◆ getTimeslice()

getTimeslice ( self)

◆ scheduleCallback()

scheduleCallback ( self,
callback )

◆ scheduleThread()

scheduleThread ( self,
thread )

◆ setTimeslice()

setTimeslice ( self,
timeslice )

◆ taskTimeLeft()

taskTimeLeft ( self)
returns True if there is time left for the current task callback
to run without going over the allotted timeslice

Member Data Documentation

◆ _callback

_callback
protected

◆ _doThreadCallback

_doThreadCallback
protected

◆ _Serial

_Serial = SerialNumGen()
staticprotected

◆ _taskStartTime

_taskStartTime
protected

◆ notify

notify = directNotify.newCategory("TaskThreaded")
static