# Asynchronous Code

> Code that starts a slow task and keeps going. It handles the result later.

**Field:** Software Development  
**Category:** Programming Paradigms  
**Also known as:** Asynchronous Programming, Async Code, Non-Blocking Code

## Think of it like

Think of it like a café buzzer. You sit down, and it buzzes when your coffee is ready.

## Definition

Asynchronous code starts a slow task and moves on without waiting for it. When the task is done, the program comes back to handle the result. Slow tasks are things like downloads, database calls and timers. This keeps a screen working and lets a server serve many people at once. Callbacks, promises and async/await are the tools for writing it.

## Example

Jack's new script starts all 10 picture downloads at once. They finish together in about 1 second instead of 10.

## Why it matters

Every web page and most servers depend on it. Without it, one slow request would stop everything.

## Common mistake

Using the result before it has arrived. The line below the call runs first, and the value is still empty.

## Three principles

- **Start and move on.** No waiting in line.
- **Handle it later.** When the result arrives.
- **Order changes.** Not top to bottom.

## Related terms

- [Synchronous Code](https://learn.benibix.com/term/development/synchronous-code)
- [Promise (JavaScript)](https://learn.benibix.com/term/development/promise)
- [Async/Await](https://learn.benibix.com/term/development/async-await)
- [Event Loop](https://learn.benibix.com/term/development/event-loop)
- [Callback Function](https://learn.benibix.com/term/development/callback)

## Told apart from

- [Synchronous vs Asynchronous Code](https://learn.benibix.com/compare/synchronous-vs-asynchronous-code): Synchronous code waits for each line to finish before the next one starts. Asynchronous code starts a slow task, moves on, and handles the result when it arrives.

---

Source: https://learn.benibix.com/term/development/asynchronous-code
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
