Parallel Queue and Stack Applications in .NET 4

.NET 4 includes new parallel data structures. The Bag and Dictionary collections have obvious applications, but I don’t see the possibility of using Queue and Stack data structures. What are these people using for?

In addition, I noticed that the design based on linked lists requires a lot of emphasis and destroys scalability. This is surprising given that the only purpose of these collections is multi-cell programming. Is this an inherent restriction or are they simply poorly implemented?

+3
source share
4 answers

Turning to the second part of your question, you are absolutely right that although parallel collection implementations in .NET 4.0 try to be blocked, they still sit on top of the unlocked memory allocation subsystem.

Memory management is the error of all loose data structures: here is a good presentation about the state of affairs: http://sysrun.haifa.il.ibm.com/hrl/ISMM2009/program.html#7

The bottom line is that this area is very advanced, so probably it is not yet ready to be included in large-scale production platforms such as .Net.

0
source

Stacks and queues are very useful in parallel programming, as well as in sequential programming.

ConcurrentQueue<T> ConcurrentStack<T> . /, ( ) , .

, : . . ~ ( ), , . ( ...) , ConcurrentQueue<T> ConcurrentStack<T> ( ) . , , std:: deque.

+11

( ) , , , .

, - . ?

+3

Source: https://habr.com/ru/post/1750205/


All Articles