Previously, the main mount loop was unlocking the thread and then immediately

re-locking it.  In some threads implementations (Linux 2.6), this causes the
mount thread to hog the lock, which causes SetMountThreadState to hang.  Move
the "check and delay" part of the mount thread outside of the lock, so other
threads have opportunity to get the lock.
This commit is contained in:
Glenn Maynard
2004-12-07 00:06:59 +00:00
parent 4bde245842
commit 495a418884
4 changed files with 28 additions and 20 deletions
@@ -15,6 +15,7 @@ protected:
virtual void Mount( UsbStorageDevice* pDevice, CString sMountPoint );
virtual void ResetUsbStorage();
virtual void MountThreadDoOneUpdate();
virtual bool MountThreadWaitForUpdate();
vector<UsbStorageDevice> m_vDevicesLastSeen;
};