mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Remove calling .ToArray() on a ConcurrentDictionary
This commit is contained in:
parent
16e032ea55
commit
4e3d713efe
1 changed files with 1 additions and 1 deletions
|
|
@ -74,7 +74,7 @@ namespace Flow.Launcher.Infrastructure.Image
|
|||
// To delete the images from the data dictionary based on the resizing of the Usage Dictionary
|
||||
// Double Check to avoid concurrent remove
|
||||
if (Data.Count > permissibleFactor * MaxCached)
|
||||
foreach (var key in Data.OrderBy(x => x.Value.usage).Take(Data.Count - MaxCached).Select(x => x.Key).ToArray())
|
||||
foreach (var key in Data.OrderBy(x => x.Value.usage).Take(Data.Count - MaxCached).Select(x => x.Key))
|
||||
Data.TryRemove(key, out _);
|
||||
semaphore.Release();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue