I have created a module to add an extra text for each product and that can be edited from the backoffice and its text saved in the database so that wh ...
I have created a module to add an extra text for each product and that can be edited from the backoffice and its text saved in the database so that wh ...
Given an external API method signature like the following: Task<int> ISomething.GetValueAsync(int x) I often see code such as the following: ...
I have designed a simple JobProcessor using TPL Data flow (my first time using it). I want to be able to create jobs, and have them invoked and placed ...
In chapter 4.4 Dynamic Parallelism, in Stephen Cleary's book Concurrency in C# Cookbook, it says the following: Parallel tasks may use blocking me ...
I'm asking this more because I have no idea of why the way I solved the issue works. Here's the method that gives me the error (notice the return lin ...
I have a method Task DoWork(): Then I use this method in another part of the project like this: And it doesn't work (just waiting too long). But ...
I have this small test in .NET 6, which works fine (it's green). However, the compiler (rightfully?) complains: warning CS1998: This async method l ...
I'm trying to run multiple Task using async but when execution reaches WhenAll() this method call never returns. EDIT: I was able to debug executi ...
I have three tier .net web api application. each tier is implementing a async method. Each call is async and and we are using await at each step. My q ...
I am trying to execute file upload using Parallel.ForEachAsync, it works but loses the sort order. Is there any method to synchronize sort order or so ...
I have desktop application in which I am doing some SQL Server queries asynchronously using ADO.NET. There is one case in which I am creating an objec ...
I don't have strong knowledge in TPL. Maybe I misunderstood some points. I have a linq-query to entities and JOIN-operator I use to connect diffrent D ...
Playing around with yield and Task. The following simple example runs fine. class Program { private static void Main(string[] args) { ...
I'm trying to understand threads in C#. Whenever I pass the method in Parallel.Invoke() it create a new thread or use thread from a thread pool? ...
In the following article, Stephen Toub describes how to build a ManualResetEvent using the TPL. In particular, he states that in the following method: ...
The Task.Run method has overloads that accept both sync and async delegates: Unfortunately these overloads don't behave the same when the delegate ...
Consider the following setup: Let's say on the constructor for the Engine class, I get 2 for workers and 4 for threads. I want to implement the Run ...
I'm following this tutorial to create a hosted service. The program runs as expected. However, I want to process the queued items concurrently. In my ...
I wrote a PLINQ query that ends with the ForAll operator, and I used the WithCancellation operator in order to cancel the query midway. Surprisingly t ...
I have a fire-and-forget Web Service that processes incoming requests. The request needs to go through number of processes that interact with the data ...