This renames acquire/release to lock/unlock in order to be compatible with std::lock_guard and std::unique_lock (which will eventually replace the *MutexHolder classes). It will also allow us to typedef MutexImpl to std::mutex later on.
A blank string to FindPythonInterp finds the version
of Python that the system "python" interpreter invokes,
so this means the default is now the system default.
This removes the requirement that it only be included
in a single C++ file per library, by forcing the compiler
to emit the function that references the version symbol
as a weak symbol itself. Now, the linker will not only
tolerate redundant inclusions, it will also coalesce them
together.
To access a WeakPointerTo in a thread-safe way, use something like this:
if (auto ptr = weak_ptr.lock()) {
..use ptr as regular PointerTo
}
The new implementation no longer needs a reference to be stored to all weak pointers on the WeakReferenceList; a mere count of weak pointers is sufficient. Therefore, callbacks theoretically no longer require a WeakPointerTo to be constructed.
The WeakPointerTo class is not actually atomic; it could be made so, but I don't believe it's worth it at this time.
This allows using a coroutine to build up a more complex sequence including transitions (eg. scripted cutscene), as well as provide a standard way to register callbacks upon completion of the transition.
We don't guarantee a specific order in this case, especially because they can be run in either order if there is more than one thread, but it is still useful to have a defined order for single-threaded task chains. To that end, tasks
are now run in the order in which they were added to taskMgr.add (in absence of any other ordering constraints).
Fixes#309
These were removed by 88dbb31daa02779405ef5326677eefb5cf93f3c8 under the assumption that they were not used, but it has recently come to my attention that there is still code out there that uses these.
PriorityCallbacks has been updated to be compatible with Python 3 by only comparing the priority, rather than the (priority, callback) tuple. This also has the side-effect of ditching the bisect dependency.
Also moves testing code from the source to the unit tests.
- Release the global lock during the user tick callback
and allow interactions with bullet world
- Acquire the lock again after the callback
Signed-off-by: deflected <deflected@users.noreply.github.com>
Instead of wrapping the whole subdirectory's CMakeLists in
a gigantic if block, we use if(NOT HAVE_FOO) + return()
This is tidier since it keeps the indentation generally consistent
across all CMakeLists files.
- Make the build matrix actually run as a matrix
- Add a few exclusion rules to turn off some of the
more esoteric cases.
- Install libav, to test that p3ffmpeg builds
- Don't do a makepanda build at all on this branch
- Simplify uses of Python
- Change indentation style; no indentation for nested lists
This fixes some cases where transitive libraries, as nominated
by a component library, were not being absorbed into a metalib,
due to the library actually not being defined yet. This makes the
logic a little more robust, first by explicitly requiring a metalib
definition to come after all component library definitions, and second
to assume a library "linked" to a component library is a non-component
if it isn't defined (yet).