mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-16 10:29:01 -07:00
only recreate the lazy when needed
This commit is contained in:
parent
26a05e6974
commit
74f211960a
@ -107,9 +107,12 @@ namespace MediaBrowser.Controller.BaseItemManager
|
||||
/// Creates the metadata refresh throttler.
|
||||
/// </summary>
|
||||
private void SetupMetadataThrottler()
|
||||
{
|
||||
if (MetadataRefreshThrottler == null || MetadataRefreshThrottler.IsValueCreated)
|
||||
{
|
||||
MetadataRefreshThrottler = new Lazy<SemaphoreSlim>(() => new SemaphoreSlim(_metadataRefreshConcurrency));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the metadata refresh concurrency.
|
||||
|
Loading…
Reference in New Issue
Block a user