Panda3D
Loading...
Searching...
No Matches
Loader._Callback Class Reference

Classes

class  _ResultAwaiter
 

Public Member Functions

 __init__ (self, loader, numObjects, gotList, callback, extraArgs)
 
 __aiter__ (self)
 
 __await__ (self)
 
 cancel (self)
 
 cancelled (self)
 
 done (self)
 
 exception (self)
 
 gotObject (self, index, object)
 
 result (self)
 

Public Attributes

 callback = callback
 
 extraArgs = extraArgs
 
 gotList = gotList
 
list objects = [None] * numObjects
 
list requestList = []
 
 requests = set()
 

Protected Attributes

 _loader = loader
 

Static Protected Attributes

bool _asyncio_future_blocking = False
 

Detailed Description

Returned by loadModel when used asynchronously.  This class is
modelled after Future, and can be awaited.

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
loader,
numObjects,
gotList,
callback,
extraArgs )

Member Function Documentation

◆ __aiter__()

__aiter__ ( self)
 This allows using `async for` to iterate asynchronously over
the results of this class.  It does guarantee to return the
results in order, though, even though they may not be loaded in
that order. 

◆ __await__()

__await__ ( self)
 Returns a generator that raises StopIteration when the loading
is complete.  This allows this class to be used with 'await'.

◆ cancel()

cancel ( self)

◆ cancelled()

cancelled ( self)

◆ done()

done ( self)

◆ exception()

exception ( self)

◆ gotObject()

gotObject ( self,
index,
object )

◆ result()

result ( self)

Member Data Documentation

◆ _asyncio_future_blocking

bool _asyncio_future_blocking = False
staticprotected

◆ _loader

_loader = loader
protected

◆ callback

callback = callback

◆ extraArgs

extraArgs = extraArgs

◆ gotList

gotList = gotList

◆ objects

objects = [None] * numObjects

◆ requestList

requestList = []

◆ requests

requests = set()