1 write to _sharedResources
System.Threading.Tasks.Dataflow (1)
Blocks\JoinBlock.cs (1)
518_sharedResources = sharedResources;
63 references to _sharedResources
System.Threading.Tasks.Dataflow (63)
Blocks\JoinBlock.cs (63)
527Common.ContractAssertMonitorStatus(_sharedResources.IncomingLock, held: true); 528if (_sharedResources._dataflowBlockOptions.Greedy) 548Common.ContractAssertMonitorStatus(_sharedResources.IncomingLock, held: true); 558Common.ContractAssertMonitorStatus(_sharedResources.IncomingLock, held: true); 559if (_sharedResources._dataflowBlockOptions.Greedy) 576Common.ContractAssertMonitorStatus(_sharedResources.IncomingLock, held: true); 586Common.ContractAssertMonitorStatus(_sharedResources.IncomingLock, held: true); 587return !_sharedResources._dataflowBlockOptions.Greedy ? _nonGreedy!.PostponedMessages.Count : _messages!.Count; 596Debug.Assert(_sharedResources._dataflowBlockOptions.Greedy, "This is only valid in greedy mode"); 597Common.ContractAssertMonitorStatus(_sharedResources.IncomingLock, held: true); 601foreach (JoinBlockTargetBase target in _sharedResources._targets) 612Common.ContractAssertMonitorStatus(_sharedResources.IncomingLock, held: false); 613Debug.Assert(!_sharedResources._dataflowBlockOptions.Greedy, "This is only used in non-greedy mode"); 617lock (_sharedResources.IncomingLock) 640lock (_sharedResources.IncomingLock) 652Common.ContractAssertMonitorStatus(_sharedResources.IncomingLock, held: false); 653Debug.Assert(!_sharedResources._dataflowBlockOptions.Greedy, "This is only used in non-greedy mode"); 667_sharedResources._exceptionAction(new InvalidOperationException(SR.InvalidOperation_FailedToConsumeReservedMessage)); 677lock (_sharedResources.IncomingLock) 694Common.ContractAssertMonitorStatus(_sharedResources.IncomingLock, held: false); 695Debug.Assert(_sharedResources._dataflowBlockOptions.Greedy, "This is only used in greedy mode"); 696Debug.Assert(_sharedResources._boundingState != null, "This is only used in bounding mode"); 705lock (_sharedResources.IncomingLock) 710bool boundingCapacityAvailable = _sharedResources._boundingState.CountIsLessThanBound || !hasTheHighestNumberOfMessagesAvailable; 711if (_decliningPermanently || _sharedResources._decliningPermanently || 721lock (_sharedResources.IncomingLock) 724if (hasTheHighestNumberOfMessagesAvailable) _sharedResources._boundingState.CurrentCount += 1; // track this new item against our bound 740Common.ContractAssertMonitorStatus(_sharedResources.IncomingLock, held: true); 741int messageCount = _sharedResources._dataflowBlockOptions.Greedy ? 744if ((_sharedResources._joinsCreated + messageCount) >= _sharedResources._dataflowBlockOptions.ActualMaxNumberOfGroups) 749foreach (JoinBlockTargetBase target in _sharedResources._targets) 757if (allAreDecliningPermanently) _sharedResources._decliningPermanently = true; 764Common.ContractAssertMonitorStatus(_sharedResources.IncomingLock, held: false); 779Common.ContractAssertMonitorStatus(_sharedResources.IncomingLock, held: false); 788Common.ContractAssertMonitorStatus(_sharedResources.IncomingLock, held: false); 795lock (_sharedResources.IncomingLock) 815_sharedResources._exceptionAction(exc); 832lock (_sharedResources.IncomingLock) 835if (_decliningPermanently || _sharedResources._decliningPermanently) 837_sharedResources.CompleteBlockIfPossible(); 847if (_sharedResources._dataflowBlockOptions.Greedy && 848(_sharedResources._boundingState == null 850((_sharedResources._boundingState.CountIsLessThanBound || !HasTheHighestNumberOfMessagesAvailable) && 851_nonGreedy!.PostponedMessages.Count == 0 && _sharedResources._taskForInputProcessing == null))) 861if (_sharedResources._boundingState != null && HasTheHighestNumberOfMessagesAvailable) _sharedResources._boundingState.CurrentCount += 1; // track this new item against our bound 867if (_sharedResources.AllTargetsHaveAtLeastOneMessage) 869_sharedResources._joinFilledAction(); 870_sharedResources._joinsCreated++; 873_sharedResources.CompleteBlockIfPossible(); 883_sharedResources.ProcessAsyncIfNecessary(); 897bool greedy = _sharedResources._dataflowBlockOptions.Greedy; 898lock (_sharedResources.IncomingLock) 902if (exception != null && ((!_decliningPermanently && !_sharedResources._decliningPermanently) || releaseReservedMessages)) 904_sharedResources._exceptionAction(exception); 920foreach (JoinBlockTargetBase target in _sharedResources._targets) 923catch (Exception e) { _sharedResources._exceptionAction(e); } 928lock (_sharedResources.IncomingLock) 932_sharedResources.CompleteBlockIfPossible(); 960var displayJoin = _sharedResources._ownerJoin as IDebuggerDisplay; 961return $"{Common.GetNameForDebugger(this)} InputCount = {InputCountForDebugger}, Join = \"{(displayJoin != null ? displayJoin.Content : _sharedResources._ownerJoin)}\""; 984public bool IsDecliningPermanently { get { return _joinBlockTarget._decliningPermanently || _joinBlockTarget._sharedResources._decliningPermanently; } }