Uses Interlocked.Increment over lock
This commit is contained in:
parent
e71d7ede97
commit
7c46899e2a
1 changed files with 2 additions and 5 deletions
|
@ -172,11 +172,8 @@ namespace Ryujinx.Profiler
|
||||||
|
|
||||||
public string GetSession()
|
public string GetSession()
|
||||||
{
|
{
|
||||||
// Can be called from multiple threads so locked to ensure no duplicate sessions are generated
|
// Can be called from multiple threads so we need to ensure no duplicate sessions are generated
|
||||||
lock (_sessionLock)
|
return Interlocked.Increment(ref _sessionCounter).ToString();
|
||||||
{
|
|
||||||
return (_sessionCounter++).ToString();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<KeyValuePair<ProfileConfig, TimingInfo>> GetProfilingData()
|
public List<KeyValuePair<ProfileConfig, TimingInfo>> GetProfilingData()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue