1 write to _itemsByPriority
Microsoft.CodeAnalysis.Analyzers (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncPriorityWorkQueue.cs (1)
84_itemsByPriority = new HashSet<TItem>[maximumPriority + 1];
24 references to _itemsByPriority
Microsoft.CodeAnalysis.Analyzers (24)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AsyncPriorityWorkQueue.cs (24)
62/// Task kicked off to do the next batch of processing of <see cref="_itemsByPriority"/>. These 69/// of items in <see cref="_itemsByPriority"/> If there is an existing in flight task, we don't need to 90for (var i = 0; i < _itemsByPriority.Length; i++) 91_itemsByPriority[i] = new HashSet<TItem>(equalityComparer); 98if (priority < 0 || priority >= _itemsByPriority.Length) 99throw new ArgumentOutOfRangeException(paramName: nameof(priority), message: $"Priority must be between 0 and {_itemsByPriority.Length - 1}"); 117if (newPriority < 0 || newPriority >= _itemsByPriority.Length) 118throw new ArgumentOutOfRangeException(paramName: nameof(newPriority), message: $"Priority must be between 0 and {_itemsByPriority.Length - 1}"); 137if (newPriority < 0 || newPriority >= _itemsByPriority.Length) 138throw new ArgumentOutOfRangeException(paramName: nameof(newPriority), message: $"Priority must be between 0 and {_itemsByPriority.Length - 1}"); 145for (var priorityToCheck = _itemsByPriority.Length - 1; priorityToCheck > newPriority; priorityToCheck--) 147if (_itemsByPriority[priorityToCheck].Remove(item)) 149Contract.ThrowIfFalse(_itemsByPriority[newPriority].Add(item)); 162for (var priorityToCheck = _itemsByPriority.Length - 1; priorityToCheck >= 0; priorityToCheck--) 164if (_itemsByPriority[priorityToCheck].Contains(item)) 171Contract.ThrowIfFalse(_itemsByPriority[priorityToCheck].Remove(item)); 172Contract.ThrowIfFalse(_itemsByPriority[priority].Add(item)); 178return addIfUnscheduled && _itemsByPriority[priority].Add(item); 224if (_itemsByPriority.All(static s => s.Count == 0)) 241if (_itemsByPriority.Any(static s => s.Count > 0)) 257for (var priorityToCheck = _itemsByPriority.Length - 1; priorityToCheck >= 0; priorityToCheck--) 259var items = _itemsByPriority[priorityToCheck]; 286for (var i = 0; i < _itemsByPriority.Length; i++) 287_itemsByPriority[i].Clear();