23 GenericAsyncTask(
const std::string &name) :
27 _upon_birth =
nullptr;
28 _upon_death =
nullptr;
36 GenericAsyncTask(
const std::string &name, GenericAsyncTask::TaskFunc *
function,
void *user_data) :
41 _upon_birth =
nullptr;
42 _upon_death =
nullptr;
52 bool GenericAsyncTask::
54 return _function !=
nullptr;
62 AsyncTask::DoneStatus GenericAsyncTask::
64 nassertr(_function !=
nullptr, DS_interrupt);
65 return (*_function)(
this, _user_data);
74 void GenericAsyncTask::
76 AsyncTask::upon_birth(manager);
78 if (_upon_birth !=
nullptr) {
79 (*_upon_birth)(
this, _user_data);
96 void GenericAsyncTask::
98 AsyncTask::upon_death(manager, clean_exit);
100 if (_upon_death !=
nullptr) {
101 (*_upon_death)(
this, clean_exit, _user_data);
A class to manage a loose queue of isolated tasks, which can be performed either synchronously (in th...
This class represents a concrete task performed by an AsyncManager.
TypeHandle is the identifier used to differentiate C++ class types.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.