Skip to main content

All Questions

Tagged with
2 votes
2 answers
65 views

"Lock Pools" or other solutions for handling memory intensive operations in a .NET Framework backend?

My backend application takes byte arrays that represent image data and applies certain transformations to it, like changing the resolution and such, and then stores this modified data to disk. During ...
Allu's user avatar
  • 41
-1 votes
1 answer
55 views

Controlling duplicate api calls with milli/micro seconds delay (concurrency)

I have a POST API, where you can save some data for a customer, there is a possibility that somebody can programatically initiates multiple calls with same data in milli/micro seconds time. Now As i ...
Vman's user avatar
  • 454
0 votes
0 answers
22 views

Concurrent http requests in .NET

I am trying to make many concurrent http requests to external API. The code which i wrote is definitely faster than the normal synchronous version (6x faster), but its still too slow. The avarage time ...
xukus's user avatar
  • 11
0 votes
0 answers
36 views

Problem with concurrency while updating data in DB using Quartz .NET and EF Core

I want to introduce horizontal scaling instead of vertical in my app. Now we are using Quartz .NET for background tasks, but in non-clustered mode, just 1 instance. So I found ability to do horizontal ...
Ihor Arkhypenko's user avatar
0 votes
1 answer
75 views

How would I create a concurrency token check on multiple columns in my DB table in EF Core?

I have to charge my users a monthly fee and want to make sure I don't charge them twice. I created a table called PlatformFee that looks like this to check to see if I've charged them. If there's any ...
chuckd's user avatar
  • 14.2k
0 votes
1 answer
60 views

Optimistic Concurrency Exception when Updating Entity with List<saleComments> Relationship in Entity Framework Core

I am trying to update a saleOrder entity in the database using Entity Framework Core. The entity has a property List<saleComments> Comments. I have an issue when attempting to save the changes, ...
Otavio Salomão Ferreira's user avatar
0 votes
0 answers
50 views

How to resolve "InvalidOperationException: A second operation was started on this context instance before a previous operation completed."

I'm encountering an issue with my ASP.NET Core application where I'm receiving the following exception: InvalidOperationException: A second operation was started on this context instance before a ...
temo mikava's user avatar
0 votes
0 answers
45 views

.NET 7 multiple concurrent HTTP requests blocking each other (threadpool contention?)

I have an application that queries a large number of separate systems to check user access status. For each system, it typically requires requesting an access token and then making one or more ...
Phil Bolduc's user avatar
  • 1,656
0 votes
0 answers
36 views

Writing content of MemoryCache to database and race conditions

I am implementing in C# .NET a simple message consumer that reads off a queue a bunch of key, value pair messages and I need to maintain a dictionary of key -> [values seen so far] (this is ...
fricadelle's user avatar
1 vote
1 answer
526 views

.NET A second operation was started on this context instance before a previous operation completed

I am getting this error: "System.InvalidOperationException: 'A second operation was started on this context instance before a previous operation completed. This is usually caused by different ...
leoxrmd's user avatar
  • 49
0 votes
1 answer
82 views

Dictionary Thread Safety when updating keys in different threads

I have a very specific use case where I need to update each key of a dictionary with a value I will have available from another dictionary in the same method context. While I know that dictionaries ...
Marcel Batista's user avatar
5 votes
2 answers
115 views

.NET Concurrent Dictionary Exchange Value

Is there a data structure similar to ConcurrentDictionary<TKey,TValue> and Interlocked.Exchange<T>(...) that would allow you atomically to set a new value and retrieve the old value ...
Kyle McClellan's user avatar
-1 votes
2 answers
135 views

Nested asynchronous tasks in .NET

I'm writing a script for extending one of my datasets of email data with some features that I have to compute by calling external APIs. I have to use C#, which is not a language I'm very confident ...
TheGreek97's user avatar
2 votes
2 answers
124 views

Bizarre concurrent behavior when I cast `ConcurrentDictionary` to an `IDictionary`

I have the following test: using System.Collections.Concurrent; using System.Collections.Generic; using System.Threading.Tasks; public class Program { public static void Main() ...
Daniel Fath's user avatar
  • 17.7k
0 votes
0 answers
128 views

How to run parallel operations on set of files?

So I'm trying to run parallel operations on a set of files using C#. The first operation converts the file type and stores it in a temporary folder. The second operation does some processing to the ...
brendan3900's user avatar

15 30 50 per page
1
2 3 4 5
35