From 6dd1ac96dca1d325b75cfc3eca34831023809691 Mon Sep 17 00:00:00 2001 From: Ivan Komissarov Date: Tue, 7 Nov 2023 21:01:44 +0300 Subject: Add Rust-like Mutex This change implements a Rust-like Mutex class that prevents unlocked access to the underlying data. As seen recently, it is easy to make a mistake and lock the wrong mutex. Also, this prevents micro-optimizations where shared state is accessed without locking corresponding mutex in hope that there is some other barrier. Change-Id: I52c7a2fa68cc97be07a490c35aa76fe717032fdf Reviewed-by: Christian Kandeler --- src/lib/corelib/corelib.qbs | 1 + 1 file changed, 1 insertion(+) (limited to 'src/lib/corelib/corelib.qbs') diff --git a/src/lib/corelib/corelib.qbs b/src/lib/corelib/corelib.qbs index bf414ff80..1a7890166 100644 --- a/src/lib/corelib/corelib.qbs +++ b/src/lib/corelib/corelib.qbs @@ -514,6 +514,7 @@ QbsLibrary { "generateoptions.h", "installoptions.h", "joblimits.h", + "mutexdata.h", "preferences.h", "processresult.h", "profile.h", -- cgit v1.2.3