aboutsummaryrefslogtreecommitdiff
path: root/src/Jellyfin.LiveTv
diff options
context:
space:
mode:
authorDaniyar Alpyspayev <daniyara@thereachagency.com>2024-12-12 18:10:06 +0500
committerDaniyar Alpyspayev <daniyara@thereachagency.com>2024-12-12 18:10:06 +0500
commit2614fecf8df6e04b0d0a2b33722923c239ed0f91 (patch)
tree815c5c68d5403423e28a6daf29fe09b1f0b361e5 /src/Jellyfin.LiveTv
parentb89877554cf1a655251958e19439926ac99c91f7 (diff)
move to new System.Threading.Lock type for better performance
Diffstat (limited to 'src/Jellyfin.LiveTv')
-rw-r--r--src/Jellyfin.LiveTv/Timers/ItemDataProvider.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Jellyfin.LiveTv/Timers/ItemDataProvider.cs b/src/Jellyfin.LiveTv/Timers/ItemDataProvider.cs
index 9e7323f5b..6a68b8c25 100644
--- a/src/Jellyfin.LiveTv/Timers/ItemDataProvider.cs
+++ b/src/Jellyfin.LiveTv/Timers/ItemDataProvider.cs
@@ -6,6 +6,7 @@ using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Linq;
using System.Text.Json;
+using System.Threading;
using Jellyfin.Extensions.Json;
using Microsoft.Extensions.Logging;
@@ -15,7 +16,7 @@ namespace Jellyfin.LiveTv.Timers
where T : class
{
private readonly string _dataPath;
- private readonly object _fileDataLock = new object();
+ private readonly Lock _fileDataLock = new();
private readonly JsonSerializerOptions _jsonOptions = JsonDefaults.Options;
private T[]? _items;