Coroutines are a feature introduced in C++20 that allow a function to be temporarily suspended, pending the completion of an asynchronous operation.
At the time of writing, Panda3D does not yet integrate support for the C++20 coroutine feature into the library. If you are feeling adventurous, see this forum thread for a way to use C++20 coroutines with the Panda3D task system:
Panda3D provides the
AsyncFuture class to represent an operation
that is currently underway. Any operation that returns this class is
considered an asynchronous operation.
As of Panda3D 1.10, this is still an experimental feature, and some behavior may change in future versions. The upcoming version of Panda3D, 1.11, will improve support for cancellation of futures in particular.