mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-02 22:08:27 +01:00
move to new System.Threading.Lock type for better performance
This commit is contained in:
@@ -23,7 +23,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// </summary>
|
||||
public class AggregateFolder : Folder
|
||||
{
|
||||
private readonly object _childIdsLock = new object();
|
||||
private readonly Lock _childIdsLock = new();
|
||||
|
||||
/// <summary>
|
||||
/// The _virtual children.
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// </summary>
|
||||
public class UserRootFolder : Folder
|
||||
{
|
||||
private readonly object _childIdsLock = new object();
|
||||
private readonly Lock _childIdsLock = new();
|
||||
private List<Guid> _childrenIds = null;
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -12,8 +12,8 @@ namespace MediaBrowser.Controller.MediaEncoding;
|
||||
public sealed class TranscodingJob : IDisposable
|
||||
{
|
||||
private readonly ILogger<TranscodingJob> _logger;
|
||||
private readonly object _processLock = new();
|
||||
private readonly object _timerLock = new();
|
||||
private readonly Lock _processLock = new();
|
||||
private readonly Lock _timerLock = new();
|
||||
|
||||
private Timer? _killTimer;
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace MediaBrowser.Controller.Net
|
||||
SingleWriter = false
|
||||
});
|
||||
|
||||
private readonly object _activeConnectionsLock = new();
|
||||
private readonly Lock _activeConnectionsLock = new();
|
||||
|
||||
/// <summary>
|
||||
/// The _active connections.
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace MediaBrowser.Controller.Session
|
||||
private readonly ISessionManager _sessionManager;
|
||||
private readonly ILogger _logger;
|
||||
|
||||
private readonly object _progressLock = new();
|
||||
private readonly Lock _progressLock = new();
|
||||
private Timer _progressTimer;
|
||||
private PlaybackProgressInfo _lastProgressInfo;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user