Concurrency is the ability of different parts or units of a program, algorithm, or problem to be executed out-of-order or in partial order, without affecting the final outcome.
Concurrency is the ability of your program to deal with many things at once and is achieved through multithreading.
I also have a page on Parallel Computing.
I will learn this in CS343.
One of the core concepts is a lock. Two Phase Locking.
- Concurrency involves a shared memory location, and the different threads actually “read” the information provided by the previous threads.
- With parallelism, copies are not necessarily in communication with each other, but they are running at the same time in parallel.
Do not confuse concurrency with parallelism which is about doing many things at once.
- Source: Educative.io
So in concurrency, processes share the same resources, which results in many problems… more below.
- This course looks good https://www.educative.io/courses/modern-cpp-concurrency-in-practice-get-the-most-out-of-any-machine
- A tutorial on modern multithreading and concurrency in C++
- Multithreading and concurrency fundamentals
- Top 5 Concurrency Interview Questions for Software Engineers
See Multithreading (C++).
Dangers of Concurrency...
With great power comes greater responsibility. Some issues Involved with Concurrency (multiple threads):