DELAPARRA
Index
Color
NL
Category: Programming paradigms

Concurrent Programming

Explained by Updated

What is Concurrent Programming?

Concurrent Programming: Concurrency is about dealing with many things at once — tasks can start, run, and complete in overlapping time periods, whether or not they execute in true parallel. The core challenge is safely coordinating access to shared state. Concurrent programming is about dealing with several tasks whose lifetimes overlap. They may run truly in parallel on different processor cores, or take turns on one. Either way, the program has to coordinate them.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about Concurrent Programming

How is Concurrent Programming used in practice?

The hard part is shared state. When two tasks read and change the same data at the same time, results depend on timing. These bugs, called race conditions, appear only under load and are notoriously hard to reproduce.

What should you keep in mind with Concurrent Programming?

Web applications deal with concurrency constantly, because many requests run at once against the same database. The usual tools are database transactions, row locks, atomic updates and unique constraints. A good habit is to ask for every write: what happens if two requests do this at the same moment? If the answer is unclear, protect it.

At a glance

CategoryProgramming paradigms
Explained by
Updated

More Programming paradigms terms

All terms starting with C

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.