panda3d.core.AsyncTaskCollection

class AsyncTaskCollection

A list of tasks, for instance as returned by some of the AsyncTaskManager query functions. This also serves to define an AsyncTaskSequence.

TODO: None of this is thread-safe yet.

Inheritance diagram

Inheritance diagram of AsyncTaskCollection

__init__() → None
__init__(copy: AsyncTaskCollection) → None
addTask(task: AsyncTask) → None

Adds a new AsyncTask to the collection.

addTasksFrom(other: AsyncTaskCollection) → None

Adds all the AsyncTasks indicated in the other collection to this task. The other tasks are simply appended to the end of the tasks in this list; duplicates are not automatically removed.

assign(copy: AsyncTaskCollection) → AsyncTaskCollection
Return type

AsyncTaskCollection

clear() → None

Removes all AsyncTasks from the collection.

findTask(name: str) → AsyncTask

Returns the task in the collection with the indicated name, if any, or NULL if no task has that name.

Return type

AsyncTask

getNumTasks() → size_t

Returns the number of AsyncTasks in the collection.

Return type

size_t

getTask(index: size_t) → AsyncTask

Returns the nth AsyncTask in the collection.

Return type

AsyncTask

getTasks() → list
hasTask(task: AsyncTask) → bool

Returns true if the indicated AsyncTask appears in this collection, false otherwise.

output(out: ostream) → None

Writes a brief one-line description of the AsyncTaskCollection to the indicated output stream.

removeDuplicateTasks() → None

Removes any duplicate entries of the same AsyncTasks on this collection. If a AsyncTask appears multiple times, the first appearance is retained; subsequent appearances are removed.

removeTask(task: AsyncTask) → bool

Removes the indicated AsyncTask from the collection. Returns true if the task was removed, false if it was not a member of the collection.

removeTask(index: size_t) → None

Removes the nth AsyncTask from the collection.

removeTasksFrom(other: AsyncTaskCollection) → None

Removes from this collection all of the AsyncTasks listed in the other collection.

size() → size_t

Returns the number of tasks in the collection. This is the same thing as getNumTasks().

Return type

size_t

write(out: ostream, indent_level: int) → None

Writes a complete multi-line description of the AsyncTaskCollection to the indicated output stream.