mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 00:37:51 -06:00
Refactoring of RemovableDriveManager:
1) On Windows and Linux, the device enumeration now runs at a background thread, while it ran on the UI thread on idle, which may have been blocking on some rare Windows setups, see GH #3515 #3733 #3746 #3766 2) On OSX, the device enumeration now relies on OS callback, no polling is required. 3) Refactored for cleaner interface.
This commit is contained in:
parent
85bf78f7e7
commit
b3b800de65
11 changed files with 640 additions and 753 deletions
|
@ -451,12 +451,13 @@ void Mouse3DController::shutdown()
|
|||
// Stop the worker thread, if running.
|
||||
{
|
||||
// Notify the worker thread to cancel wait on detection polling.
|
||||
std::unique_lock<std::mutex> lock(m_stop_condition_mutex);
|
||||
std::lock_guard<std::mutex> lock(m_stop_condition_mutex);
|
||||
m_stop = true;
|
||||
m_stop_condition.notify_all();
|
||||
}
|
||||
m_stop_condition.notify_all();
|
||||
// Wait for the worker thread to stop.
|
||||
m_thread.join();
|
||||
m_stop = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue