blockingcollection Questions
0
I'm using a BlockingCollection{T} that's filled from only one thread and consumed by only one thread. Producing and consuming items works fine. The problem is at the end of this operation. The task...
Paramaribo asked 1/7, 2014 at 6:44
2
Solved
Is there a way to batch a collection of items from the blocking collection.
E.G.
I have a messaging bus publisher calling
blockingCollection.Add()
And a consuming thread which is created ...
Osteoblast asked 11/2, 2014 at 14:1
3
Solved
In C#, I'm wondering if it's possible to wait until a BlockingCollection is cleared by a background thread, with a timeout if it takes too long.
The temporary code that I have at the moment strike...
Deportment asked 7/1, 2014 at 13:22
3
Solved
does anyone know if, when iterating on a C# BlockingCollection<>, the elements are taken from the collection, in the same way that BlockingCollection.Take() does for example?
BlockingCollection...
Boffa asked 6/12, 2013 at 11:16
2
Solved
I am using a ConcurrentDictionary to store log-lines, and when I need to display them to the user I call ToList() to generate a list. But the weird thing is that some users receive the most recent ...
Bagwell asked 16/11, 2013 at 15:21
2
Solved
I subscribe to a service that will raise an Event when a new element is received, I add this element to a BlockingCollection.
I have a second thread running that will loop the BlockingCollection to...
Phototelegraph asked 5/11, 2012 at 14:27
1
Solved
I have a BlockingCollection(ConcurrentBag, 50000) where I am trying to use a very small Bounded Capacity of 50,000 for the producer threads in order to maximize the number of records I can process ...
Emanuele asked 31/10, 2012 at 3:48
2
Solved
I have the following code with one producer thread and multiple consumer threads. Do you know if multiple consumers are thread safe. For example is there any chance that thread 1 is consuming and w...
Semifinal asked 2/11, 2012 at 12:42
1
Solved
I'm using a Producer/Consumer Pattern with a System.Collection.Concurrent.BlockingCollection<DataTable> to retrieve data from a database (producer) and create a Lucene Index on the data (consume...
Anemochore asked 10/10, 2012 at 16:55
2
In the following code I'm using the CancellationToken to wake up the GetConsumingEnumerable() when the producer is not producing and I want to break out of the foreach and exit the Task. But I dont...
Varistor asked 2/2, 2012 at 2:36
1
Solved
I've reused the example producer consumer queue from the C# in a Nutshell book of Albahari (http://www.albahari.com/threading/part5.aspx#_BlockingCollectionT) and a colleague remarked:
"Why isn't t...
Martguerita asked 24/2, 2012 at 9:55
3
I need a concurrent collection that doesn't allow duplicates (to use in BlockingCollection as Producer/Consumer).
I don't need strict order of elements.
From another hand i want to minimize the max...
Quent asked 30/4, 2011 at 23:12
1
Solved
I need to build a blocking priority queue and my hunch is that TakeFromAny may be the secret ingredient, however the documentation on that method is sparse. What is its purpose / appropriate use?
M...
Latonia asked 13/9, 2010 at 13:15
© 2022 - 2024 — McMap. All rights reserved.