May 2010
Intermediate to advanced
1272 pages
61h 18m
English
ConcurrentStack(Of T)ConcurrentStack(Of T) is the thread-safe implementation of the Stack(Of T) generic collection and works according to the LIFO (Last-In, First-Out) logic. The following code shows an example of using this collection:

The big difference between this collection and its thread-unsafe counterpart is that you can also add an array of items invoking PushRange, whereas you still invoke Push to add a single item. To remove an array from the stack, you invoke TryPopRange, which takes three arguments: the target array that will store the removed items, the start index, and the number of items to remove. Both PushRange and TryPopRange ...
Read now
Unlock full access