feat : 新增配置参数控制缓存文件验证最大并发数
This commit is contained in:
+3
-1
@@ -54,11 +54,13 @@ namespace YooAsset
|
||||
// 设置同时验证的最大数
|
||||
ThreadPool.GetMaxThreads(out int workerThreads, out int ioThreads);
|
||||
YooLogger.Log($"Work threads : {workerThreads}, IO threads : {ioThreads}");
|
||||
_verifyMaxNum = Math.Min(workerThreads, ioThreads);
|
||||
int threads = Math.Min(workerThreads, ioThreads);
|
||||
_verifyMaxNum = Math.Min(threads, _fileSystem.FileVerifyMaxConcurrency);
|
||||
_verifyTotalCount = fileCount;
|
||||
if (_verifyMaxNum < 1)
|
||||
_verifyMaxNum = 1;
|
||||
|
||||
YooLogger.Log($"Verify max concurrency : {_verifyMaxNum}");
|
||||
_verifyingList = new List<VerifyFileElement>(_verifyMaxNum);
|
||||
_steps = ESteps.UpdateVerify;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user