Commit Graph

193 Commits

Author SHA1 Message Date
rdb a72be90f17 Merge branch 'release/1.10.x' 2019-10-29 23:13:22 +01:00
rdb f149fb4ab0 direct: big formatting changes for the benefit of API reference
Part of the effort to move the API reference to Sphinx, see panda3d/panda3d-docs#21
2019-10-29 20:43:41 +01:00
rdb ffeb8937bf task: fix unnecessary use of PythonUtil.Queue class
A standard list will do just fine here.
2019-10-29 14:57:20 +01:00
Christopher Snow b06b5791ca Task: Couple two clauses which execute the same logic.
Closes #589
2019-03-29 12:18:37 +01:00
rdb ed5e5386b9 AsyncFuture improvements, incl. support for gathering futures 2017-12-21 14:07:01 +01:00
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
rdb 0c0f9adab9 Support coroutines and async/await in the task manager and loader 2017-10-31 18:56:41 +01:00
rdb f1f4951fb5 Merge remote-tracking branch 'origin/release/1.9.x' 2016-10-13 00:25:57 +02:00
rdb f363088cb2 Fix exception when creating intervals before ShowBase is started 2016-09-30 00:21:12 +02:00
Mitchell Stokes 74d588696c Fix Python3 support 2016-05-15 10:27:37 +02:00
David Rose 28cbe13d85 task names can be unicode strings too, better to check against basestring 2016-05-13 18:21:12 -07:00
rdb 23bf9ea5c7 The direct tree is now valid Python 2 *and* 3 2016-03-28 22:33:30 +02:00
rdb 54fa31ba17 StandardError -> Exception, other 2to3 changes, threaded 2to3 2016-03-25 17:13:09 +01:00
rdb 0d03207d1b Dramatically reduce size of frozen/compiled code by pruning/masking unnecessary imports/code 2016-02-12 22:20:27 +01:00
rdb e0e2d6d222 Ignore run() in emscripten 2016-02-11 19:10:59 +01:00
rdb 03c8d4c009 Fix use of many builtins 2016-02-02 13:41:20 +01:00
rdb dafe48a6bc Begin to add snake_case/property interfaces to important direct classes 2015-12-26 17:00:51 +01:00
rdb 0a9f9887f9 Merge branch 'release/1.9.x'
Conflicts:
	direct/src/p3d/Packager.py
	direct/src/p3d/ppackage.py
	makepanda/makepandacore.py
2015-11-21 03:17:33 +01:00
rdb 2d6c2c5c6d Remove dependency on tkpanels and tkwidgets modules when building .p3d package 2015-11-20 17:42:18 +01:00
rdb 31dbcae262 Deprecate many extension methods, make extension methods imported via modules instead of dumped into core.py, move _core.pyd and _direct.pyd back to core.pyd, direct.pyd respectively, move MAIN_DIR set-up code to module init time 2015-11-10 00:44:29 +01:00
rdb d9342043b0 Deprecate pandac.PandaModules and genPyCode, move extensions to panda3d/, clean up imports and deprecated behaviour 2015-06-28 13:55:31 +02:00
rdb f87785d2c0 Allow using Panda without 'signal' module in platforms that do not have one (eg. JavaScript) 2015-06-21 17:37:50 +02:00
rdb 0aa0f34c74 Lots of work to make the rtdist work with the new library building system 2015-01-12 15:02:42 +01:00
rdb f8acde64f7 taskMgr.destroy() should imply stop() 2014-08-14 18:08:31 +00:00
rdb c729775265 The 'new' module has been deprecated since 2.6 and removed in Python 3, let's not use it (use 'types' module instead) 2013-12-23 15:08:00 +00:00
David Rose 646f12f625 squelch backtrace on SystemExit 2012-02-16 00:19:09 +00:00
Darren Ranalli 9462d332dc upload client stack dump to event logs 2010-04-29 01:25:11 +00:00
rdb ac1223d0da Ditch stuff like has_key and backticks 2010-03-19 10:32:09 +00:00
David Rose 73943dd77e taskMgr.getCurrentTask() 2010-02-09 20:15:31 +00:00
David Rose 50b9e51aa6 fix shutdown while downloading 2009-12-28 21:16:56 +00:00
David Rose 62aaf94cb0 frameSync 2009-12-05 19:39:45 +00:00
David Rose 7de817fb2b remove old task manager 2009-09-25 14:50:14 +00:00
David Rose 05a2432673 safe to make this the default now 2008-10-24 21:55:37 +00:00
David Rose 993b1af160 remove __debug__ 2008-10-03 15:18:02 +00:00
David Rose cd8f9030d8 wip: starting experimental C-based task manager 2008-09-19 01:09:04 +00:00
Darren Ranalli 26d56476f0 added ~ailogtaskprofiles, added ~aitaskprofileflush <name> 2008-09-19 00:28:05 +00:00
Darren Ranalli a7f8a4af41 include max non-spike profile, added ~taskprofileflush/~aitaskprofileflush 2008-09-18 22:30:57 +00:00
Darren Ranalli 8bf2bdfa1f added RAM-file support to prevent disk access while profiling 2008-09-18 18:24:57 +00:00
Darren Ranalli 35a6e9f49e don't warn about leaked garbage collect task on exit 2008-09-17 23:35:35 +00:00
Darren Ranalli 2d8e530230 clean up doLater task 2008-09-17 23:10:57 +00:00
Darren Ranalli 9b36b7b487 fixed mismatched-spike-task bug 2008-09-17 00:27:22 +00:00
Darren Ranalli 86d00a7024 added explicit garbage collect task 2008-09-16 20:28:24 +00:00
Darren Ranalli 6895e25221 added task profiler 2008-09-15 21:47:37 +00:00
Darren Ranalli c312d30eb8 added accessor methods for task duration warning threshold 2008-09-06 00:09:12 +00:00
Darren Ranalli 535d898e66 changed task duration warning config, default threshold to 40 2008-09-04 21:53:15 +00:00
Darren Ranalli e79a864125 working exception variable dump 2008-09-03 21:16:09 +00:00
Darren Ranalli 77cfda8691 fix for div-by-zero in task duration warning 2008-08-26 00:13:06 +00:00
Darren Ranalli d0ef5b51ff long-running task warning now warns based on average frame duration 2008-08-25 21:59:14 +00:00
Darren Ranalli dc064dfa41 fixed doLater nameDict leak 2008-08-01 17:50:19 +00:00
Josh Wilson a480d86b62 asserting notify statements to clean up the game logs 2008-07-09 01:37:58 +00:00