AsyncTaskCollection
from panda3d.core import AsyncTaskCollection
- class AsyncTaskCollection
Bases:
A list of tasks, for instance as returned by some of the
AsyncTaskManager
query functions. This also serves to define anAsyncTaskSequence
.TODO: None of this is thread-safe yet.
Inheritance diagram
- __add__(other: AsyncTaskCollection) AsyncTaskCollection
- __getitem__(index: int) AsyncTask
Returns the nth
AsyncTask
in the collection. This is the same asget_task()
, but it may be a more convenient way to access it.
- __iadd__(other: AsyncTaskCollection) AsyncTaskCollection
- __init__()
- __init__(copy: AsyncTaskCollection)
- add_tasks_from(other: AsyncTaskCollection)
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
- clear()
Removes all
AsyncTasks
from the collection.
- find_task(name: str) AsyncTask
Returns the task in the collection with the indicated name, if any, or NULL if no task has that name.
- get_num_tasks() int
Returns the number of
AsyncTasks
in the collection.
- has_task(task: AsyncTask) bool
Returns true if the indicated
AsyncTask
appears in this collection, false otherwise.
- output(out: ostream)
Writes a brief one-line description of the
AsyncTaskCollection
to the indicated output stream.
- remove_duplicate_tasks()
Removes any duplicate entries of the same
AsyncTasks
on this collection. If aAsyncTask
appears multiple times, the first appearance is retained; subsequent appearances are removed.
- remove_task(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.
- remove_tasks_from(other: AsyncTaskCollection)
Removes from this collection all of the
AsyncTasks
listed in the other collection.
- size() int
Returns the number of tasks in the collection. This is the same thing as
get_num_tasks()
.
- write(out: ostream, indent_level: int)
Writes a complete multi-line description of the
AsyncTaskCollection
to the indicated output stream.