I tried BlockingCollection and ConcurrentDictionary. It continues by adding BlockingCollection items as soon as the thread is completed, but Concurren ...
I tried BlockingCollection and ConcurrentDictionary. It continues by adding BlockingCollection items as soon as the thread is completed, but Concurren ...
I am looking at migrating from Dictionary to ConcurrentDictionary for a multi thread environment. Specific to my use case, a kvp would typically be & ...
So I am working on the communication manager for a naval simulator that manages both communications and stores all the data and I need to serialize to ...
The given code attempts to run a fire-and-forget Task while acquiring a lock to avoid race conditions on a cached element. while debugging the whole a ...
This is a follow-up of this question. I am now working with ConcurrentDictionary, but while browsing through it, I am still launching the constructor ...
I have a C# .NET program that uses an external API to process events for real-time stock market data. I use the API callback feature to populate a Con ...
In my project I'm using some static variables which I use for storing values during the running lifetime of the application. Now, 99% of the time I'm ...
I have a simple connection manager service in my web app that keeps track of websocket connections against a user GUID they are associated with. These ...
I'm working on project with following workflow : Background service consumme messages from Rabbitmq's queue Background service use background ta ...
Streaming live prices for stocks, each stock is key (int) and its value type is struct (not class) Dictionary<int,Tick>. This dictionary is init ...
I have a function to clean up some objects as well as the ReaderWriterLockSlim. But I need the ReaderWriterLockSlim to lock as writer lock to prevent ...
new poster here so I hope this makes sense ... I need to create a collection that I can remove items from in sequence (basically stock market time se ...
When calling TryUpdate you should specify old value besides key, why is it required ? And additional question why TryUpdate method (and others similar ...
I wonder if it's safe to replace Dictionary with ConcurrentDictionary and what modifications should I do to for ex. TryAdd, TryGetValue, removing lock ...
I am struggling with this problem and would really appreciate any help. I'm working on an existing project. I have added logic that counts values comb ...
Why do we need third argument comparisonValue in ConcurrentDictionary.TryUpdate method? And why will updating not succeed if already existed value is ...
I have multiple tasks that grab messages from a queue in a 1:1 fashion. I want to add these messages from each thread into a ConcurrentBag and process ...
I stumbled upon the following obstacle. I need to have a ConcurrentDictionary<string, ArrayList> which has string as key and ArrayList as value. ...
I'm writing something like a file cache and I'm debating between using lock or ConcurrentDictionary. If multiple threads ask for a key, then an ordina ...
I'm enumerating ConcurrentDictionary, I need to be sure I don't miss any initial item. In other words, I need to be sure I enumerate all initial items ...