Skip to main content

Questions tagged [task-parallel-library]

The Task Parallel Library is part of .NET 4 and .NET 4.5. It is a set of APIs to enable developers to program asynchronous applications.

6 votes
1 answer
386 views

.NET 8 finally introduced a time abstraction that can be used to fake advance a clock while testing certain components. https://learn.microsoft.com/en-us/dotnet/api/system.timeprovider?view=net-9.0 ...
JaggerJo's user avatar
  • 163
1 vote
1 answer
415 views

This is a request-response model over sockets/websockets (like HTTP) where you technically match request id to response id and return the response. In addition to that, there is timeout in case that ...
nop's user avatar
  • 819
4 votes
1 answer
192 views

This is a tiny class that creates backup copies of a file so these can be diff'ed to spot the changes compared to last run; used when generating code and so far has proved to be very helpful. ...
aybe's user avatar
  • 612
3 votes
2 answers
2k views

I've written a lot of (await SomeTask).AsList(); in my project, and it's kind of annoying to keep wrapping it. To fix this I've written a little extension method on ...
Joost00719's user avatar
1 vote
1 answer
653 views

I am enjoying making various programs with C++. This is my first code review request. And I hope I can get some insights or might have good advice to make my code better. I make a task class using C++...
Y.frank's user avatar
  • 29
3 votes
0 answers
8k views

I'm having an implementation using SerialPort in C# using Visual Studio 2019. I'm using it in a Windows Application, using .NET Framework 4.7.2. When I open and ...
Hans Billiet's user avatar
2 votes
0 answers
606 views

I'm using the SerialPort in C# using Visual Studio 2019. My SerialPort has 2 "pump" tasks, which are private members of my SerialPort, and are started during an Initialization method: ...
Hans Billiet's user avatar
1 vote
1 answer
380 views

Anybody mind providing an opinion on whether or not this is a good or bad example of Task Cancellation and why. I have my own opinion and I've been told that its baseless, just trying to find out who ...
Bogatitus's user avatar
1 vote
1 answer
716 views

I have following code: ...
leroy's user avatar
  • 13
3 votes
3 answers
1k views

Example of use: var users = await usernames.SelectTaskResults(GetUserDetails, 4); where GetUserDetails(string username) is a ...
Paul Totzke's user avatar
1 vote
1 answer
561 views

This service takes in a report request object that can contain multiple reports that need to be rendered. This code works but I'm not sure if I've implemented anything wrong. Note the ...
Usman Khan's user avatar
4 votes
1 answer
101 views

Here is the sender and handler interfaces: ...
Dmitry Nogin's user avatar
  • 6,131
5 votes
1 answer
760 views

I have come across a situation where I feel running some code in parallel will greatly improve performance, but I am concerned about the implementation and am looking for some confirmation. Take the ...
ZMJ's user avatar
  • 51
2 votes
1 answer
636 views

I've got a method, CheckForValue(), that uses named pipes to send a message to another process running locally, and then receive a message from that process, ...
user3591541's user avatar
1 vote
1 answer
517 views

I have a potentially long running operation and I want to trigger some action if takes too long time. Also I want to reuse this logic. Operation to check: ...
Maxim Tkachenko's user avatar

15 30 50 per page
1
2 3 4 5
11