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

◆ ProcessMessage()

void System.Threading.Tasks.Dataflow.TransformBlock< TInput, TOutput >.ProcessMessage ( Func< TInput, TOutput > transform,
KeyValuePair< TInput, long > messageWithId )
inlineprivate

Definition at line 162 of file TransformBlock.cs.

163 {
164 TOutput item = default(TOutput);
165 bool flag = false;
166 try
167 {
168 item = transform(messageWithId.Key);
169 flag = true;
170 }
171 catch (Exception exception)
172 {
174 {
175 throw;
176 }
177 }
178 finally
179 {
180 if (!flag)
181 {
182 _target.ChangeBoundingCount(-1);
183 }
184 if (_reorderingBuffer == null)
185 {
186 if (flag)
187 {
188 if (_target.DataflowBlockOptions.MaxDegreeOfParallelism == 1)
189 {
190 _source.AddMessage(item);
191 }
192 else
193 {
195 {
196 _source.AddMessage(item);
197 }
198 }
199 }
200 }
201 else
202 {
203 _reorderingBuffer.AddItem(messageWithId.Value, item, flag);
204 }
205 }
206 }
static bool IsCooperativeCancellation(Exception exception)
Definition Common.cs:88
readonly ReorderingBuffer< TOutput > _reorderingBuffer

References System.Threading.Tasks.Dataflow.TransformBlock< TInput, TOutput >._reorderingBuffer, System.Threading.Tasks.Dataflow.TransformBlock< TInput, TOutput >._source, System.Threading.Tasks.Dataflow.TransformBlock< TInput, TOutput >._target, System.exception, System.Threading.Tasks.Dataflow.Internal.Common.IsCooperativeCancellation(), System.item, and System.Threading.Tasks.Dataflow.TransformBlock< TInput, TOutput >.ParallelSourceLock.