Skip to main content

Deep dive into I/O and streaming

In this chapter

  • Deep dive into I/O and streaming
    • When to use HttpClient with ResponseHeadersRead
    • Asynchronous FileStream I/O and backpressure control
  • Review of best practices
    • When to use ConfigureAwait(false)
    • Choosing between I/O-bound and CPU-bound work
    • Unit testing asynchronous code
  • Server-side practice (ASP.NET Core)
    • Server-side note: be disciplined with retries
  • Client-side UI practice (WinForms / WPF / MAUI)
    • Case study 1: keeping the UI responsive in Windows Forms
    • Modern WinForms: async forms (.NET 9+)
    • Safer UI updates: Control.InvokeAsync (.NET 9+)
    • Case study 2: asynchronous MVVM in WPF/MAUI
    • Summary
  • Conclusion

This chapter is not available in the free preview. Purchase the book to read the complete edition now.

Buy this book