diff --git a/Ryujinx.Profiler/InternalProfile.cs b/Ryujinx.Profiler/InternalProfile.cs index d817f32e48..d5145ea0f9 100644 --- a/Ryujinx.Profiler/InternalProfile.cs +++ b/Ryujinx.Profiler/InternalProfile.cs @@ -172,11 +172,8 @@ namespace Ryujinx.Profiler public string GetSession() { - // Can be called from multiple threads so locked to ensure no duplicate sessions are generated - lock (_sessionLock) - { - return (_sessionCounter++).ToString(); - } + // Can be called from multiple threads so we need to ensure no duplicate sessions are generated + return Interlocked.Increment(ref _sessionCounter).ToString(); } public List> GetProfilingData()