Terraria v1.4.4.9
Terraria source code documentation
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros

◆ EnqueueSlow()

void System.Collections.Concurrent.ConcurrentQueue< T >.EnqueueSlow ( T item)
inlineprivateinherited

Definition at line 322 of file ConcurrentQueue.cs.

323 {
324 while (true)
325 {
327 if (tail.TryEnqueue(item))
328 {
329 break;
330 }
332 {
333 if (tail == _tail)
334 {
335 tail.EnsureFrozenForEnqueues();
336 int boundedLength = (tail._preservedForObservation ? 32 : Math.Min(tail.Capacity * 2, 1048576));
337 _tail = (tail._nextSegment = new ConcurrentQueueSegment<T>(boundedLength));
338 }
339 }
340 }
341 }
volatile ConcurrentQueueSegment< T > _tail

References System.Collections.Concurrent.ConcurrentQueue< T >._crossSegmentLock, System.Collections.Concurrent.ConcurrentQueue< T >._tail, System.item, and System.Math.Min().

Referenced by System.Collections.Concurrent.ConcurrentQueue< T >.Enqueue().