mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-23 02:24:44 +01:00
update locking
This commit is contained in:
@@ -226,7 +226,7 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||
/// <summary>
|
||||
/// The _root folder
|
||||
/// </summary>
|
||||
private AggregateFolder _rootFolder;
|
||||
private volatile AggregateFolder _rootFolder;
|
||||
/// <summary>
|
||||
/// The _root folder sync lock
|
||||
/// </summary>
|
||||
@@ -759,7 +759,7 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||
return rootFolder;
|
||||
}
|
||||
|
||||
private UserRootFolder _userRootFolder;
|
||||
private volatile UserRootFolder _userRootFolder;
|
||||
private readonly object _syncLock = new object();
|
||||
public Folder GetUserRootFolder()
|
||||
{
|
||||
|
||||
@@ -239,7 +239,11 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV
|
||||
|
||||
public Task CancelSeriesTimerAsync(string timerId, CancellationToken cancellationToken)
|
||||
{
|
||||
var timers = _timerProvider.GetAll().Where(i => string.Equals(i.SeriesTimerId, timerId, StringComparison.OrdinalIgnoreCase));
|
||||
var timers = _timerProvider
|
||||
.GetAll()
|
||||
.Where(i => string.Equals(i.SeriesTimerId, timerId, StringComparison.OrdinalIgnoreCase))
|
||||
.ToList();
|
||||
|
||||
foreach (var timer in timers)
|
||||
{
|
||||
CancelTimerInternal(timer.Id);
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV
|
||||
where T : class
|
||||
{
|
||||
private readonly object _fileDataLock = new object();
|
||||
private List<T> _items;
|
||||
private volatile List<T> _items;
|
||||
private readonly IJsonSerializer _jsonSerializer;
|
||||
protected readonly ILogger Logger;
|
||||
private readonly string _dataPath;
|
||||
|
||||
Reference in New Issue
Block a user