private void CleanupBackgroundWorkerDoWork(object sender, DoWorkEventArgs e) { while (_sourcePathsToDelete.Count > 0) { var path = _sourcePathsToDelete.Dequeue(); _sourceDrive.DeleteDirectory(path); } }