cosmetics

This commit is contained in:
UbitUmarov
2019-11-20 23:16:20 +00:00
parent 0cf3ec553a
commit bd12d60e80
5 changed files with 33 additions and 31 deletions

View File

@@ -2485,7 +2485,10 @@ namespace OpenSim.Framework
case FireAndForgetMethod.SmartThreadPool:
return m_ThreadPool.MaxThreads - m_ThreadPool.InUseThreads;
case FireAndForgetMethod.Thread:
return MAX_SYSTEM_THREADS - System.Diagnostics.Process.GetCurrentProcess().Threads.Count;
{
using(Process p = System.Diagnostics.Process.GetCurrentProcess())
return MAX_SYSTEM_THREADS - p.Threads.Count;
}
default:
throw new NotImplementedException();
}
@@ -2972,7 +2975,8 @@ namespace OpenSim.Framework
public static long GetPhysicalMemUse()
{
return System.Diagnostics.Process.GetCurrentProcess().WorkingSet64;
using (Process p = System.Diagnostics.Process.GetCurrentProcess())
return p.WorkingSet64;
}
// returns a timestamp in ms as double