Commit Graph

21 Commits

Author SHA1 Message Date
rdb 80951b3268 task: provide more properties on AsyncTask 2018-10-07 23:02:50 +02:00
Sam Edwards 7790f8429d general: Fully qualify header references into the std namespace
Closes #341
2018-06-07 10:35:12 +02:00
rdb 9fad3dba60 general: remove macros for compatibility with non-C++11 compilers
Now that we require MSVC 2015, we no longer need all this nonsense, so we can write cleaner code.
2018-05-23 23:33:05 +02: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 47388b0dbc Separate out CPython calls from core libs; eliminate need for pystub 2016-07-20 14:30:41 +02:00
tobspr 0fcfb8e372 New file headers, new comment style 2016-02-17 17:47:48 +01:00
rdb 6480e82e3b First pass adding properties to many Panda classes 2015-12-10 16:23:06 +01:00
rdb b63d5fbe8c Support cyclic garbage collection through PythonTask objects 2015-03-15 12:24:06 +01:00
rdb 4dc4c9eb3d Merge branch 'master' into interrogate-overhaul
Conflicts:
	dtool/src/interrogate/functionRemap.cxx
	dtool/src/interrogate/interfaceMakerPythonNative.cxx
	panda/src/event/pythonTask.cxx
	panda/src/express/multifile.h
	panda/src/express/pointerToArray.I
	panda/src/mathutil/config_mathutil.N
	panda/src/putil/config_util.N
	panda/src/putil/doubleBitMask.h
2015-02-11 14:41:58 +01:00
rdb cbd70ad8af Move all Python bindings out of core DLLs into the .pyd files. 2015-02-10 14:30:51 +01:00
rdb 6db5d0dc11 Huge cppparser and interrogate overhaul, bringing:
* Better support for typedefs
* Same code should compile for both 32-bit and 64-bit
* C++11 typed enum support
* Synthesize __setitem__ when operator [] returns reference
* Rewrite coerce system to have better performance
* Change semantics of __getattr__ and __setattr__ to match
  Python's, add __getattribute__, __delattr__ and __delitem__
* Improve performance of slot functions a bit more
* Reduce memory overhead of type system
* Some support for wrapping arrays of numeric types
* C++11 character type support in cppparser
* Chars are handled as strings of length 1
* Template functions for CreatePyInstance that use runtime type map
* More functions from dtool as extension functions
* Code cleanup
2014-12-30 16:43:52 +01:00
Darren Ranalli 0955e0aabc make sure DirectObject._addTask and ._clearTask are called only once per task create/destroy 2010-01-13 23:37:56 +00:00
David Rose 3bd5914b57 upon_birth race condition issues 2008-10-13 18:24:18 +00:00
David Rose 7683d94100 add TaskManager- events 2008-10-11 14:49:10 +00:00
David Rose 2266110083 AsyncTask::is_runnable 2008-09-29 05:59:41 +00:00
David Rose a29328046a fix some threading issues 2008-09-28 17:11:42 +00:00
David Rose fd1218b07b task generators 2008-09-27 12:33:47 +00:00
David Rose 7e217b8bdc handle more exotic uses of taskMgr 2008-09-26 23:42:22 +00:00
David Rose 524128b9fd wip: starting experimental C-based task manager 2008-09-19 00:58:04 +00:00