Asynchronous Processing and Multithreading Are Always Fun
summary
Covers practical async and multithreading patterns in .NET: when to use Task.Run for CPU-bound work vs normal async for IO-bound work, and why Task.FromResult/Task.CompletedTask are much cheaper than allocating new Tasks. Explains async void pitfalls (exceptions escaping; prefer Func<Task> over Action), shows batching IO with Task.WhenAll to outperform awaiting in a loop, and demonstrates async stack-trace tools, benchmarks, plus notes on ConfigureAwait, async locals, and GC/finalizer issues on older .NET.
AI-written summary · about
chapters (14)
- 0:00Async and threading intro
- 3:56Sync vs async
- 7:33CPU vs I/O ops
- 10:48How async/await works
- 15:48Async migration pitfalls
- 19:52Exceptions in async
- 24:08Fixing async bugs
- 27:57Thread and pool usage
- 31:27Async performance myths
- 35:23Async and transactions
- 37:10Async and IDisposable
- 40:23Optimizing async loops
- 42:52Execution after await
- 44:18Tips and tools
related talks
01h 02mBack to Basics: Efficient Async and Await
01h 01mBack to Basics: Efficient Async and Await
01h 15mBest Practices for Using async and await
52mCorrecting Common Mistakes When Using Async/Await in .NET
30mHow to Test Asynchronous Code
36mTesting Asynchronous Code in Swift 5.5
45mUnit testing patterns for Concurrent code
28mIf an asyncio Task fails in the woods and nobody is around to see it, does i....
