mirror of
https://github.com/vrcx-team/VRCX.git
synced 2026-04-06 00:32:02 +02:00
lock
This commit is contained in:
@@ -62,21 +62,27 @@ namespace VRCX
|
||||
|
||||
internal void Exit()
|
||||
{
|
||||
_timer.Change(-1, -1);
|
||||
_performanceCounter?.Dispose();
|
||||
lock (this)
|
||||
{
|
||||
_timer.Change(-1, -1);
|
||||
_performanceCounter?.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
private void TimerCallback(object state)
|
||||
{
|
||||
try
|
||||
lock (this)
|
||||
{
|
||||
if (_performanceCounter != null)
|
||||
try
|
||||
{
|
||||
if (_performanceCounter != null)
|
||||
{
|
||||
CpuUsage = _performanceCounter.NextValue();
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
CpuUsage = _performanceCounter.NextValue();
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,8 +37,11 @@ namespace VRCX
|
||||
|
||||
internal void Exit()
|
||||
{
|
||||
m_Timer.Change(-1, -1);
|
||||
m_Client?.Dispose();
|
||||
lock (this)
|
||||
{
|
||||
m_Timer.Change(-1, -1);
|
||||
m_Client?.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
private void TimerCallback(object state)
|
||||
|
||||
Reference in New Issue
Block a user