Fixing the SD card eject issue on OSX by pushing the call to

"diskutil eject" to a worker thread.
Hopefully fixes Ejecting an SD card is slow and locks UI #4844
This commit is contained in:
Vojtech Bubnik 2021-01-07 12:02:44 +01:00
parent daa0bbdb0c
commit 18cf1fdb43
2 changed files with 64 additions and 27 deletions

View file

@ -132,6 +132,8 @@ private:
void eject_device(const std::string &path);
// Opaque pointer to RemovableDriveManagerMM
void *m_impl_osx;
std::thread *m_eject_thread { nullptr };
void eject_thread_finish();
#endif
};