open_toontown_panda3d/tests
rdb 2e20a0f16e Implement awaitable thread-safe future for async operations
This introduces AsyncFuture as a new base class of AsyncTask.  It's modelled after asyncio's Future class, except that it is thread-safe and you can use result() to block the current thread waiting for the future to finish (of course this is not necessary for use with coroutines).

AsyncFuture should be used for any operation that finishes in the future, to get the benefit of awaitability within coroutines as well as a standard interface for querying status and results of the operation as well as cancelling it.  As such, it's been implemented in various places, including texture.prepare() and win.trigger_copy().

Note that AsyncFuture is intended to be used *once*; it cannot be used more than once.  As an example of how this works, tex.prepare() will return the same future as long as the prepare isn't complete, but when it is done, subsequent calls to tex.prepare() will return a new future.
2017-12-04 22:25:28 +01:00
..
bullet tests: add unit tests for bullet bam serializability 2017-11-08 01:56:31 +01:00
display display: also avoid getting more than 24 color bits if 0 were requested 2017-11-26 00:06:03 +01:00
event Implement awaitable thread-safe future for async operations 2017-12-04 22:25:28 +01:00
interrogate interrogate: more improvements to seq/map wrappers 2017-11-27 17:29:50 +01:00
pgraph tests: Add simple NodePath tests using PyTest 2017-11-03 17:58:53 +01:00