private int ComputePriority() { lock (_gate) { int priority = Priority.LOW; foreach (var pair in _consumerContextPairs) { priority = Priority.GetHigherPriority(priority, pair.Key.Item2.Priority); } return(priority); } }