> As mentioned on https://codereview.qt-project.org/#change,83272 Kevin Funk > measured the difference between the current approach and using atomics using > Olivier's initial benchmark, it's about 4-5x slower for checking if there's a > callback set. Since this is affecting every Qt application on a not uncommon > hot path, I'd rather trade in theoretical tool stability for general > performance.
The register / unregister methods can do the actual work in the QApplication thread to avoid locking. To support more callbacks, the pointer can be pointer to linked list of function pointer + context instead of pure function pointer. Kind regards Brano _______________________________________________ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development