Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbubnikv <bubnikv@gmail.com>2020-03-12 13:30:51 +0300
committerbubnikv <bubnikv@gmail.com>2020-03-12 13:30:58 +0300
commitc145d60df437447f16d06be9b85fa90df0e58185 (patch)
tree55f147048c191e1acefe135bc2737cd2de1aef75 /src/slic3r/GUI/RemovableDriveManager.hpp
parent29f2394ecbb6586965bf86e26e989b4e3f150329 (diff)
Improvement in the RemovableDriveManager update function:
Don't call the update() if it is already running. Wait for the other instance to finish instead.
Diffstat (limited to 'src/slic3r/GUI/RemovableDriveManager.hpp')
-rw-r--r--src/slic3r/GUI/RemovableDriveManager.hpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/slic3r/GUI/RemovableDriveManager.hpp b/src/slic3r/GUI/RemovableDriveManager.hpp
index 8b661d19c..c12f2dd0a 100644
--- a/src/slic3r/GUI/RemovableDriveManager.hpp
+++ b/src/slic3r/GUI/RemovableDriveManager.hpp
@@ -102,6 +102,8 @@ private:
// sorted ascending by path
std::vector<DriveData> m_current_drives;
mutable tbb::mutex m_drives_mutex;
+ // Locking the update() function to avoid that the function is executed multiple times.
+ mutable tbb::mutex m_inside_update_mutex;
// Returns drive path (same as path in DriveData) if exists otherwise empty string.
std::string get_removable_drive_from_path(const std::string& path);