rename method

This commit is contained in:
in0finite 2022-01-24 01:51:48 +01:00
parent 4d6295aaf0
commit 5ec8ad8890
2 changed files with 3 additions and 3 deletions

View file

@ -332,7 +332,7 @@ namespace SanAndreasUnity.Editor
float diffPerc = endPerc - startPerc;
long initialNumPendingJobs = LoadingThread.Singleton.GetNumJobsPending();
long initialNumPendingJobs = LoadingThread.Singleton.GetNumJobsPendingApproximately();
yield return null; // this must be done, otherwise LoadingThread does not start processing any job
@ -341,7 +341,7 @@ namespace SanAndreasUnity.Editor
{
LoadingThread.Singleton.UpdateJobs();
numPendingJobs = LoadingThread.Singleton.GetNumJobsPending();
numPendingJobs = LoadingThread.Singleton.GetNumJobsPendingApproximately();
long numJobsProcessed = initialNumPendingJobs - numPendingJobs;
float currentPerc = startPerc + diffPerc * (numJobsProcessed / (float)initialNumPendingJobs);

View file

@ -209,7 +209,7 @@ namespace SanAndreasUnity.Behaviours
}
}
public long GetNumJobsPending()
public long GetNumJobsPendingApproximately()
{
// this is not done in a critical section: calling Count on 2 multithreaded collections
return (long)_threadParameters.jobs.Count + (long)_threadParameters.processedJobs.Count + (long)_processedJobsBuffer.Count;