Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ CompleteTargetIfPossible()

void System.Threading.Tasks.Dataflow.BroadcastBlock< T >.CompleteTargetIfPossible ( )
inlineprivate

Definition at line 850 of file BroadcastBlock.cs.

851 {
853 {
854 return;
855 }
856 _completionReserved = true;
857 if (_boundingState != null && _boundingState.PostponedMessages.Count > 0)
858 {
859 Task.Factory.StartNew(delegate(object state)
860 {
863 if (broadcastBlock._boundingState != null)
864 {
865 Common.ReleaseAllPostponedMessages(broadcastBlock, broadcastBlock._boundingState.PostponedMessages, ref exceptions);
866 }
867 if (exceptions != null)
868 {
869 broadcastBlock._source.AddExceptions(exceptions);
870 }
871 broadcastBlock._source.Complete();
872 }, this, CancellationToken.None, Common.GetCreationOptionsForTask(), TaskScheduler.Default);
873 }
874 else
875 {
877 }
878 }
readonly BroadcastingSourceCore< T > _source
readonly BoundingStateWithPostponedAndTask< T > _boundingState
static TaskCreationOptions GetCreationOptionsForTask(bool isReplacementReplica=false)
Definition Common.cs:267

References System.Threading.Tasks.Dataflow.BroadcastBlock< T >._boundingState, System.Threading.Tasks.Dataflow.BroadcastBlock< T >._completionReserved, System.Threading.Tasks.Dataflow.BroadcastBlock< T >._decliningPermanently, System.Threading.Tasks.Dataflow.BroadcastBlock< T >._source, System.Threading.Tasks.Dataflow.BroadcastBlock< T >.BroadcastingSourceCore< TOutput >.Complete(), System.Threading.Tasks.TaskScheduler.Default, System.exceptions, System.Threading.Tasks.Task< TResult >.Factory, System.Threading.Tasks.Dataflow.Internal.Common.GetCreationOptionsForTask(), System.Threading.CancellationToken.None, System.state, and System.Threading.Tasks.Dataflow.Internal.BoundingStateWithPostponedAndTask< TInput >.TaskForInputProcessing.

Referenced by System.Threading.Tasks.Dataflow.BroadcastBlock< T >.CompleteCore(), System.Threading.Tasks.Dataflow.BroadcastBlock< T >.ConsumeMessagesLoopCore(), System.Threading.Tasks.Dataflow.BroadcastBlock< T >.OfferMessage(), and System.Threading.Tasks.Dataflow.BroadcastBlock< T >.OnItemsRemoved().