3 ms·
I'm curious what experience led to this opinion because I can't disagree more. Most any .NET site doing volume should be using TPL, because the framework is in
by lllr_finger 10y ago
I'm curious what experience led to this opinion because I can't disagree more.
Most any .NET site doing volume should be using TPL, because the framework is incredibly efficient at managing threads and preventing the pipeline from getting clogged. I've worked on dozens of APIs and sites that need to deal with hundreds and thousands of concurrent requests. Handling those in a synchronous fashion or hand-rolling state management is horrible and I'd never want to go back to it.
The only downside I agree with is the debugging, but that gets better with every C#/.NET/VS release, and you really shouldn't have a ton of complexity buried in your await block. If it hurts, there's a good chance you're violating SOLID.
- mattmanser 10y agoYou have to be in a specific scenario, high load on the server's resources, not the DB, to see any benefit. You're in the specific scenario! If you're getting 1000s of concurrent requests, running at, say, 20ms each, that'd be 4.3 billion requests a day. What percentage of C# devs have that kind of load?