Chapter 1. Concurrency: An Overview
Concurrency is a key aspect of beautiful software. For decades, concurrency was possible but difficult. Concurrent software was difficult to write, difficult to debug, and difficult to maintain. As a result, many developers chose the easier path and avoided concurrency. However, with the libraries and language features available for modern .NET programs, concurrency is much easier. When Visual Studio 2012 was released, Microsoft significantly lowered the bar for concurrency. Previously, concurrent programming was the domain of experts; these days, every developer can (and should) embrace concurrency.
1.1. Introduction to Concurrency
Before continuing, I’d like to clear up some terminology that I’ll be using throughout this book. Let’s start with concurrency.
- Concurrency
- Doing more than one thing at a time.
I hope it’s obvious how concurrency is helpful. End-user applications use concurrency to respond to user input while writing to a database. Server applications use concurrency to respond to a second request while finishing the first request. You need concurrency any time you need an application to do one thing while it’s working on something else. Almost every software application in the world can benefit from concurrency.
At the time of this writing (2014), most developers hearing the term “concurrency” immediately think of “multithreading.” I’d like to draw a distinction between these two.
- Multithreading
- A form of concurrency that uses multiple ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access