Asynchronous programming
Definition
Asynchronous programming enables continuing work during long-running operations whose results are processed later.
Asynchronous programming organizes processes so that a program can perform other work while waiting operations are ongoing. The result is processed later, for example after a network request. Asynchrony describes the flow and does not automatically mean simultaneous execution on multiple processor cores.
Simply explained
While a response is on its way, the program does not have to wait idly but can continue processing other tasks.
Why it matters in practice
It supports responsive interfaces and efficient processing of pending operations, such as interface accesses or file operations.
Example from business
Example: A customer portal loads additional data in the background and allows its navigation to remain usable during the waiting time.
Limits and pitfalls
- Results may arrive in a different order than expected. Errors, cancellations, and outdated responses must be explicitly handled in the process.
Origin & history
Asynchronous methods are especially relevant for input and output. In web applications, they are part of handling events and remote services.
Use in mid-sized companies
- Operators can develop applications that remain usable even with slow-responding services and clearly indicate waiting states.
Frequently asked questions
Is asynchronous the same as parallel?
No. Asynchronous processes avoid blocking waits; true parallel computation is an additional execution feature.
Sources
- Introducing asynchronous JavaScript. · MDN Web Docs (o. J.): Introducing asynchronous JavaScript.
Editorially reviewed on: