9b3265c46c
After testing with multithreading there were still problems related to scope and transmitters - because a transmitter that was on the stack as an object could go out of scope before a notify all had finished and lead to invalid data and a crash The solution is to always have Recipients allocated via new() and to use a shared pointer to manage the scope and garbage collect when the last reference goes out of scope. To achieve the threadsafe minimal locking the rules are as follows; * All recipients must be allocated via new() * Register and DeRegister will only happen when on the outermost level of NotifyAll. - all other add or delete will be put into the pending queue and added at the start of the next outer notify all - at outer level notify all a lock will be taken to process pending items * during the main notify processing there will be no locks - however it is also assumed that the recipient list will not be changed |
||
---|---|---|
3rdparty | ||
CMakeModules | ||
simgear | ||
.gitignore | ||
AUTHORS | ||
ChangeLog | ||
CMakeLists.txt | ||
COPYING | ||
Doxyfile | ||
DoxygenMain.cxx | ||
INSTALL | ||
NEWS | ||
README | ||
README.cmake | ||
README.OSG | ||
README.sound | ||
README.zlib | ||
simgear-version | ||
SimGearConfig.cmake.in | ||
Thanks |
SimGear - Simulator Construction Tools ====================================== http://www.flightgear.org SimGear is a set of open-source libraries designed to be used as building blocks for quickly assembling 3d simulations, games, and visualization applications. SimGear is developed by the FlightGear project and also provides the base for the FlightGear Flight Simulator. Source code for SimGear is released under the GNU Library General Public License (LGPL) - see COPYING for license details. See INSTALL file for help on building SimGear.