Skip to content

runners/calculator: add mutex for CALCULATOR creation/destruction

Yifan Zhu requested to merge work/cherry-pick-de9d0798 into Plasma/6.0

When using the search field in the overview effect with multiple monitors, multiple concurrent calls to match(...) are issued. Since Qalculate is initialized on demand, multiple calls to its constructor may be issued at the same time. This can cause race conditions in accessing the global CALCULATOR instance. Add mutex to protect its construction and destruction.

BUG: 478998

(cherry picked from commit de9d0798)

Merge request reports