mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-14 18:27:58 -06:00
Improvement in the RemovableDriveManager update function:
Don't call the update() if it is already running. Wait for the other instance to finish instead.
This commit is contained in:
parent
29f2394ecb
commit
c145d60df4
2 changed files with 20 additions and 10 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue