Module Engine :: Class Engine
[show private | hide private]
[frames | no frames]

Class Engine

Known Subclasses:
GameEngine

Main task scheduler.
Method Summary
  __init__(self, fps, tickrate)
  addTask(self, task, synchronized)
Add a task to the engine.
  boostBackgroundThreads(self, boost)
Increase priority of background threads.
  collectGarbage(self)
Run a garbage collection run.
  enableGarbageCollection(self, enabled)
Enable or disable garbage collection whenever a random garbage collection run would be undesirable.
  pauseTask(self, task)
Pause a task.
  quit(self)
  removeTask(self, task)
Remove a task from the engine.
  resumeTask(self, task)
Resume a paused task.
  run(self)
Run one cycle of the task scheduler engine.

Method Details

addTask(self, task, synchronized=True)

Add a task to the engine.
Parameters:
task - Task to add
synchronized - If True, the task will be run with small timesteps tied to the engine clock. Otherwise the task will be run once per frame.
           (type=bool)

boostBackgroundThreads(self, boost)

Increase priority of background threads.

@param boost True of the scheduling of the main UI thread should  be
             made fairer to background threads, False otherwise.

collectGarbage(self)

Run a garbage collection run.

enableGarbageCollection(self, enabled)

Enable or disable garbage collection whenever a random garbage collection run would be undesirable. Disabling the garbage collector has the unfortunate side-effect that your memory usage will skyrocket.

pauseTask(self, task)

Pause a task.
Parameters:
task - Task to pause

removeTask(self, task)

Remove a task from the engine.
Parameters:
task - Task to remove

resumeTask(self, task)

Resume a paused task.
Parameters:
task - Task to resume

run(self)

Run one cycle of the task scheduler engine.

Generated by Epydoc 2.1 on Sat Apr 14 13:33:25 2007 http://epydoc.sf.net