mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-09-01 03:30:06 +00:00
Review usage of string.Substring (part 1)
Reduced allocations by replacing string.Substring with ReadOnlySpan<char>.Slice
This commit is contained in:
parent
0750357916
commit
febb6bced6
25 changed files with 124 additions and 99 deletions
|
|
@ -1,3 +1,5 @@
|
|||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Diagnostics;
|
||||
|
|
@ -365,7 +367,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles
|
|||
/// <returns>System.Object.</returns>
|
||||
private SemaphoreSlim GetLock(string filename)
|
||||
{
|
||||
return _semaphoreLocks.GetOrAdd(filename, key => new SemaphoreSlim(1, 1));
|
||||
return _semaphoreLocks.GetOrAdd(filename, _ => new SemaphoreSlim(1, 1));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue