mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-29 20:24:47 +03:00
Remove custom Threading
This commit is contained in:
@@ -10,7 +10,6 @@ using MediaBrowser.Controller.Session;
|
||||
using MediaBrowser.Model.Entities;
|
||||
using MediaBrowser.Model.Extensions;
|
||||
using MediaBrowser.Model.Session;
|
||||
using MediaBrowser.Model.Threading;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Emby.Server.Implementations.EntryPoints
|
||||
@@ -23,19 +22,17 @@ namespace Emby.Server.Implementations.EntryPoints
|
||||
private readonly IUserManager _userManager;
|
||||
|
||||
private readonly object _syncLock = new object();
|
||||
private ITimer UpdateTimer { get; set; }
|
||||
private readonly ITimerFactory _timerFactory;
|
||||
private Timer UpdateTimer { get; set; }
|
||||
private const int UpdateDuration = 500;
|
||||
|
||||
private readonly Dictionary<Guid, List<BaseItem>> _changedItems = new Dictionary<Guid, List<BaseItem>>();
|
||||
|
||||
public UserDataChangeNotifier(IUserDataManager userDataManager, ISessionManager sessionManager, ILogger logger, IUserManager userManager, ITimerFactory timerFactory)
|
||||
public UserDataChangeNotifier(IUserDataManager userDataManager, ISessionManager sessionManager, ILogger logger, IUserManager userManager)
|
||||
{
|
||||
_userDataManager = userDataManager;
|
||||
_sessionManager = sessionManager;
|
||||
_logger = logger;
|
||||
_userManager = userManager;
|
||||
_timerFactory = timerFactory;
|
||||
}
|
||||
|
||||
public Task RunAsync()
|
||||
@@ -56,7 +53,7 @@ namespace Emby.Server.Implementations.EntryPoints
|
||||
{
|
||||
if (UpdateTimer == null)
|
||||
{
|
||||
UpdateTimer = _timerFactory.Create(UpdateTimerCallback, null, UpdateDuration,
|
||||
UpdateTimer = new Timer(UpdateTimerCallback, null, UpdateDuration,
|
||||
Timeout.Infinite);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user