class
FileScheduler
Locks access to files on the same drive, allowing only one file to be read at a time, per drive.
This prevents multiple threads accessing multiple files on the same drive at once, ruining performance on mechanical drives.
Public
Methods
staticLock
Locks access and doesn't allow other threads to get past this point until access is unlocked.
Any scheduled file access should happen past this point.
staticUnlock
Unlocks access and allows another thread to lock file access.
Must be provided with the same file path as lock().
staticGetLock
Returns a lock object that immediately locks access (same as lock()), and then calls unlock() when it goes out of scope.