This commit is contained in:
in0finite 2022-01-24 01:52:57 +01:00
parent 5ec8ad8890
commit 86c1165777

View file

@ -211,6 +211,8 @@ namespace SanAndreasUnity.Behaviours
public long GetNumJobsPendingApproximately()
{
ThreadHelper.ThrowIfNotOnMainThread();
// 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;
}