concurrent-collections Questions
4
Solved
Recently read about immutable collections.
They are recommended to be used as a thread safe for reading, when the read operations are performed more often than write.
Then I want to test read perfo...
Choric asked 30/9, 2018 at 18:57
5
Solved
I am trying to re-write some code using Dictionary to use ConcurrentDictionary. I have reviewed some examples but I am still having trouble implementing the AddOrUpdate function. This is the origin...
Altruism asked 11/8, 2011 at 15:49
2
Solved
BlockingCollection contains only methods to add individual items. What if I want to add a collection? Should I just use foreach loop?
Why BlockingCollection doesn't contain method to add a collecti...
Peursem asked 8/9, 2012 at 8:26
4
I have multiple producers and a single consumer. However if there is something in the queue that is not yet consumed a producer should not queue it again. (unique no duplicates blocking collection ...
Palembang asked 6/7, 2011 at 22:48
2
I have a concurrent BlockingCollection with repeated elements. How can modify it to add or get distinct elements?
Dumps asked 4/10, 2011 at 18:50
4
Solved
I've already read previous questions here about ConcurrentBag but did not find an actual sample of implementation in multi-threading.
ConcurrentBag is a thread-safe bag implementation, optimized...
Broncho asked 20/3, 2013 at 10:57
4
Solved
I have a method which takes an IList<T> and adds stuff to it. I would like to pass it a ConcurrentBag<T> in some cases, but it doesn't implement IList<T> or ICollection<T>, ...
Quelpart asked 10/4, 2011 at 12:42
1
With reference from MSDN ConcurrentBag<T>::TryTake method.
Attempts to remove and return an object from the ConcurrentBag<T>.
I am wondering about on which basis it removes object fro...
Skippie asked 22/8, 2017 at 5:36
2
Solved
What is the difference between SynchronizedCollection<T> and the other concurrent collections?
How does SynchronizedCollection<T> and the concurrent collections in the System.Collections.Concurrent namespace differ from each other, apart from Concurrent Collections being a namespace an...
Feldspar asked 11/1, 2011 at 7:20
7
Solved
Is there a way to add multiple items to ConcurrentBag all at once, instead of one at a time? I don't see an AddRange() method on ConcurrentBag, but there is a Concat(). However, that's not working ...
Suellensuelo asked 16/4, 2012 at 16:12
3
Solved
Preface: I'm only asking this because I don't have an environment (dataset large enough + computing power) to test it in a reliable fashion.
Question: Given a ConcurrentBag<T>, loaded with bi...
Larina asked 15/2, 2016 at 18:30
4
I am trying to write a program where I schedule items for removal by putting them in a collection from different threads and cleaning them up in a single thread that iterates of the collection and ...
Curvy asked 11/10, 2013 at 19:54
2
Solved
In a parallel section of my code, I save the results from each thread to a ConcurrentBag<Τ>. However, when this is complete, I need to iterate through each of these results and run them throu...
Gratifying asked 8/2, 2016 at 6:25
3
Solved
Quite simple: Other than ConcurrentDictionary (which I'll use if I have to but it's not really the correct concept), is there any Concurrent collection (IProducerConsumer implementation) that suppo...
Gimlet asked 27/7, 2012 at 21:4
3
Solved
I am trying to figure out what the best way of working with a queue will be. I have a process that returns a DataTable. Each DataTable, in turn, is merged with the previous DataTable. There is one ...
Capsulate asked 29/12, 2010 at 2:38
3
Solved
Is there a C# class that provides map with weak keys or/and weak values?
Or at least WeakHashMap like functionality.
Finegrain asked 17/1, 2010 at 15:59
2
Solved
I am developing an application framework that will be utilized by Silverlight on the client side and .NET 4 on the server side. Internally, the framework has dictionary and queue data structures wh...
Ritter asked 2/5, 2011 at 15:18
1
Solved
Initial Situation
I'm developing a .NET Framework 4.0, C#, Winform Application. The Application will list (and test) WebServiceOperations in a GridView (with currently 60 DataRows => WebServiceOpe...
Unlettered asked 23/1, 2013 at 16:22
1
Possible Duplicate:
What’s the difference between ConcurrentHashMap and Collections.synchronizedMap(Map)?
I was reading differences between HashMap, Collenctions.synchonizedMap and Co...
Larkin asked 9/1, 2013 at 5:45
1
Solved
System.Collections.Queue class has Queue.Synchronized method which returns a thread-safe Queue implementation.
But the generic one, System.Collections.Generic.Queue does not have a Synchronized me...
Berchtesgaden asked 3/1, 2013 at 23:23
1
Solved
I am basically looking for a container of image collections acquired from camera in a thread. Since ConcurrentQueue is thread-safe, I wanted to use it. But while debugging my code, I found this art...
Byelostok asked 28/11, 2012 at 18:37
2
Solved
I need to implement the producer/consumer pattern around a fixed-size FIFO queue. I think a wrapper class around a ConcurrentQueue might work for this but I'm not completely sure (and I've never wo...
Sudden asked 13/9, 2012 at 16:29
11
Before I started a project, I wrote a simple test to compare the performance of ConcurrentBag from (System.Collections.Concurrent) relative to locking & lists. I am extremely surprised that Con...
Fredericton asked 24/1, 2011 at 18:26
5
Solved
I am interested if there is any framework that implements a collection that would have the following behavior.
Suppose it initially contains: [1, 2, 3]
I iterate it (using an iterator) and rea...
Domella asked 27/6, 2012 at 13:55
4
Solved
I am making an application that takes a bunch of journal entries and calculate sum.
Is below way of doing it is thread/concurrency safe when there are multiple threads calling the addToSum() metho...
Hispanic asked 19/12, 2011 at 21:8
1 Next >
© 2022 - 2024 — McMap. All rights reserved.