mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-26 05:50:18 +00:00
rename method
This commit is contained in:
parent
4d6295aaf0
commit
5ec8ad8890
2 changed files with 3 additions and 3 deletions
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue