Concurrency

Updated: 02/07/2022 by Computer Hope

Concurrency may refer to any of the following:

Simple terminal screens, one with a less than sign, forward slash, and greater-than sign, and the other terminal screen is blank

1. Concurrency is the occurrence of multiple events within overlapping time frames, but not simultaneously. On a computer system, concurrency is implemented in the paradigm called concurrent computing.

The three main types of concurrent computing are threading, asynchrony, and preemptive multitasking. Each method has its own special precautions which must be taken to prevent race conditions, where multiple threads or processes access the same shared data in memory in improper order.

Tip

For in-depth information about concurrent programming, see the Apple developer guide, Concurrency Programming: An Introduction.

2. When working with databases, concurrency controls help make sure each transaction on the database takes place in a particular order rather than at the same time. This keeps the transactions from working at the same time, which could cause data to become incorrect or corrupt the database.

For example, if two data transactions are written to a database table at the same time, one or both data entries could be lost. Concurrency controls ensure that each transaction is processed one after the other, so that the data is entered properly.

Database terms, Programming terms