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

◆ TryDequeueSlow()

bool System.Collections.Concurrent.ConcurrentQueue< T >.TryDequeueSlow ( [MaybeNullWhen(false)] out T item)
inlineprivateinherited

Definition at line 358 of file ConcurrentQueue.cs.

359 {
360 while (true)
361 {
363 if (head.TryDequeue(out item))
364 {
365 return true;
366 }
367 if (head._nextSegment == null)
368 {
369 item = default(T);
370 return false;
371 }
372 if (head.TryDequeue(out item))
373 {
374 break;
375 }
377 {
378 if (head == _head)
379 {
380 _head = head._nextSegment;
381 }
382 }
383 }
384 return true;
385 }
volatile ConcurrentQueueSegment< T > _head

References System.Collections.Concurrent.ConcurrentQueue< T >._crossSegmentLock, System.Collections.Concurrent.ConcurrentQueue< T >._head, and System.item.

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