C# Concurrency
eBook - ePub

C# Concurrency

Asynchronous and multithreaded programming

  1. English
  2. ePUB (mobile friendly)
  3. Available on iOS & Android
eBook - ePub

C# Concurrency

Asynchronous and multithreaded programming

About this book

Supercharge your applications with the ultimate guide to asynchronous and multithreaded programming in C#!

C# Concurrency teaches you how to write effective multithreaded and asynchronous software in C#. Practical techniques, real-world examples, and useful code samples cut through the confusion around async/await and help you write rapid, reliable, and bug-free code.

In C# Concurrency: Asynchronous and Multithreaded Programming you’ll learn how to:

• Take full advantage of async/await
• Write bug-free multithreaded code every time
• Create multithreaded code that delivers real performance improvements
• Grok C# and .NET multithreading and asynchronous primitives
• Know when to use concurrency techniques—and when not to use them!

In C# Concurrency Nir Dobovizki, a seasoned C# veteran with over 30 years of high-performance programming experience, shares his deep knowledge and expert techniques. Say goodbye to frustrating pitfalls and impossible-to-find bugs that slow down your applications. Nir's careful approach will teach you how to navigate these challenges with ease, allowing you to achieve lightning-fast performance like never before!

About the technology

Asynchronous and multithreaded programs can perform multiple tasks simultaneously without losing speed or reliability. But getting concurrency right can challenge even experienced developers. This practical book teaches you to deliver concurrent C# apps that are lighting fast and free of the deadlocks and other synchronization issues that undermine performance and take forever to find.

About the book

C# Concurrency equips programmers with a comprehensive understanding of multithreading and asynchronous programming, focusing on the practical use of the C# async-await feature to simplify asynchronous tasks. It teaches how to avoid common pitfalls, addresses classic multithreading issues like deadlocks and race conditions, and advanced topics such as controlling thread of execution and using thread-safe collections.

What's inside

• .NET multithreading and asynchronous primitives
• When to use concurrency techniques—and when not to!
• Confidently use async/await

About the reader

For experienced C# programmers. No knowledge of asynchro- nous programming required.

About the author

Nir Dobovizki is a senior software architect and consultant who has worked on concurrent and asynchronous systems since the late 90s.

Table of Contents

1 Asynchronous programming and multithreading
2 The compiler rewrites your code
3 The async and await keywords
4 Multithreading basics
5 async/await and multithreading
6 When to use async/await
7 Classic multithreading pitfalls and how to avoid them
Part 2
8 Processing a sequence of items in the background
9 Canceling background tasks
10 Await your own events
11 Controlling on which thread your asynchronous code runs
12 Exceptions and async/await
13 Thread-safe collections
14 Generating collections asynchronously/await foreach and IAsyncEnumerable

Trusted by 375,005 students

Access to over 1 million titles for a fair monthly price.

Study more efficiently using our study tools.

Information

Publisher
Manning
Year
2025
eBook ISBN
9781638357292

Table of contents

  1. C# Concurrency
  2. Copyright
  3. dedication
  4. contents
  5. front matter
  6. Part 1. Asynchronous programming and multithreading basics
  7. 1 Asynchronous programming and multithreading
  8. 2 The compiler rewrites your code
  9. 3 The async and await keywords
  10. 4 Multithreading basics
  11. 5 async/await and multithreading
  12. 6 When to use async/await
  13. 7 Classic multithreading pitfalls and how to avoid them
  14. Part 2. Advanced uses of async/await and multithreading
  15. 8 Processing a sequence of items in the background
  16. 9 Canceling background tasks
  17. 10 Await your own events
  18. 11 Controlling on which thread your asynchronous code runs
  19. 12 Exceptions and async/await
  20. 13 Thread-safe collections
  21. 14 Generating collections asynchronously/await foreach and IAsyncEnumerable
  22. index

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn how to download books offline
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 990+ topics, we’ve got you covered! Learn about our mission
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more about Read Aloud
Yes! You can use the Perlego app on both iOS and Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app
Yes, you can access C# Concurrency by Nir Dobovizki in PDF and/or ePUB format, as well as other popular books in Computer Science & Parallel Programming. We have over one million books available in our catalogue for you to explore.