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

◆ PushRange() [2/2]

void System.Collections.Concurrent.ConcurrentStack< T >.PushRange ( T[] items,
int startIndex,
int count )
inline

Definition at line 119 of file ConcurrentStack.cs.

120 {
122 if (count != 0)
123 {
124 Node node;
125 Node node2 = (node = new Node(items[startIndex]));
126 for (int i = startIndex + 1; i < startIndex + count; i++)
127 {
128 Node node3 = new Node(items[i]);
129 node3._next = node2;
130 node2 = node3;
131 }
132 node._next = _head;
133 if (Interlocked.CompareExchange(ref _head, node2, node._next) != node._next)
134 {
136 }
137 }
138 }
static void ValidatePushPopRangeInput(T[] items, int startIndex, int count)
static int CompareExchange(ref int location1, int value, int comparand)

References System.Collections.Concurrent.ConcurrentStack< T >._head, System.Threading.Interlocked.CompareExchange(), System.count, System.Collections.Concurrent.ConcurrentStack< T >.PushCore(), System.startIndex, and System.Collections.Concurrent.ConcurrentStack< T >.ValidatePushPopRangeInput().