1 write to _sharedResources
System.Threading.Tasks.Dataflow (1)
Blocks\JoinBlock.cs (1)
506_sharedResources = sharedResources;
63 references to _sharedResources
System.Threading.Tasks.Dataflow (63)
Blocks\JoinBlock.cs (63)
515Common.ContractAssertMonitorStatus(_sharedResources.IncomingLock, held: true); 516if (_sharedResources._dataflowBlockOptions.Greedy) 536Common.ContractAssertMonitorStatus(_sharedResources.IncomingLock, held: true); 546Common.ContractAssertMonitorStatus(_sharedResources.IncomingLock, held: true); 547if (_sharedResources._dataflowBlockOptions.Greedy) 564Common.ContractAssertMonitorStatus(_sharedResources.IncomingLock, held: true); 574Common.ContractAssertMonitorStatus(_sharedResources.IncomingLock, held: true); 575return !_sharedResources._dataflowBlockOptions.Greedy ? _nonGreedy!.PostponedMessages.Count : _messages!.Count; 584Debug.Assert(_sharedResources._dataflowBlockOptions.Greedy, "This is only valid in greedy mode"); 585Common.ContractAssertMonitorStatus(_sharedResources.IncomingLock, held: true); 589foreach (JoinBlockTargetBase target in _sharedResources._targets) 600Common.ContractAssertMonitorStatus(_sharedResources.IncomingLock, held: false); 601Debug.Assert(!_sharedResources._dataflowBlockOptions.Greedy, "This is only used in non-greedy mode"); 605lock (_sharedResources.IncomingLock) 628lock (_sharedResources.IncomingLock) 640Common.ContractAssertMonitorStatus(_sharedResources.IncomingLock, held: false); 641Debug.Assert(!_sharedResources._dataflowBlockOptions.Greedy, "This is only used in non-greedy mode"); 655_sharedResources._exceptionAction(new InvalidOperationException(SR.InvalidOperation_FailedToConsumeReservedMessage)); 665lock (_sharedResources.IncomingLock) 682Common.ContractAssertMonitorStatus(_sharedResources.IncomingLock, held: false); 683Debug.Assert(_sharedResources._dataflowBlockOptions.Greedy, "This is only used in greedy mode"); 684Debug.Assert(_sharedResources._boundingState != null, "This is only used in bounding mode"); 693lock (_sharedResources.IncomingLock) 698bool boundingCapacityAvailable = _sharedResources._boundingState.CountIsLessThanBound || !hasTheHighestNumberOfMessagesAvailable; 699if (_decliningPermanently || _sharedResources._decliningPermanently || 709lock (_sharedResources.IncomingLock) 712if (hasTheHighestNumberOfMessagesAvailable) _sharedResources._boundingState.CurrentCount += 1; // track this new item against our bound 728Common.ContractAssertMonitorStatus(_sharedResources.IncomingLock, held: true); 729int messageCount = _sharedResources._dataflowBlockOptions.Greedy ? 732if ((_sharedResources._joinsCreated + messageCount) >= _sharedResources._dataflowBlockOptions.ActualMaxNumberOfGroups) 737foreach (JoinBlockTargetBase target in _sharedResources._targets) 745if (allAreDecliningPermanently) _sharedResources._decliningPermanently = true; 752Common.ContractAssertMonitorStatus(_sharedResources.IncomingLock, held: false); 767Common.ContractAssertMonitorStatus(_sharedResources.IncomingLock, held: false); 776Common.ContractAssertMonitorStatus(_sharedResources.IncomingLock, held: false); 783lock (_sharedResources.IncomingLock) 803_sharedResources._exceptionAction(exc); 820lock (_sharedResources.IncomingLock) 823if (_decliningPermanently || _sharedResources._decliningPermanently) 825_sharedResources.CompleteBlockIfPossible(); 835if (_sharedResources._dataflowBlockOptions.Greedy && 836(_sharedResources._boundingState == null 838((_sharedResources._boundingState.CountIsLessThanBound || !HasTheHighestNumberOfMessagesAvailable) && 839_nonGreedy!.PostponedMessages.Count == 0 && _sharedResources._taskForInputProcessing == null))) 849if (_sharedResources._boundingState != null && HasTheHighestNumberOfMessagesAvailable) _sharedResources._boundingState.CurrentCount += 1; // track this new item against our bound 855if (_sharedResources.AllTargetsHaveAtLeastOneMessage) 857_sharedResources._joinFilledAction(); 858_sharedResources._joinsCreated++; 861_sharedResources.CompleteBlockIfPossible(); 871_sharedResources.ProcessAsyncIfNecessary(); 885bool greedy = _sharedResources._dataflowBlockOptions.Greedy; 886lock (_sharedResources.IncomingLock) 890if (exception != null && ((!_decliningPermanently && !_sharedResources._decliningPermanently) || releaseReservedMessages)) 892_sharedResources._exceptionAction(exception); 908foreach (JoinBlockTargetBase target in _sharedResources._targets) 911catch (Exception e) { _sharedResources._exceptionAction(e); } 916lock (_sharedResources.IncomingLock) 920_sharedResources.CompleteBlockIfPossible(); 945var displayJoin = _sharedResources._ownerJoin as IDebuggerDisplay; 946return $"{Common.GetNameForDebugger(this)} InputCount = {InputCountForDebugger}, Join = \"{(displayJoin != null ? displayJoin.Content : _sharedResources._ownerJoin)}\""; 969public bool IsDecliningPermanently { get { return _joinBlockTarget._decliningPermanently || _joinBlockTarget._sharedResources._decliningPermanently; } }