# Asynchronous Programming

## About

Asynchronous computation refers to the execution of tasks or operations independently of the main program flow. In synchronous programming, tasks are executed one after the other, and the program waits for each task to complete before moving on to the next one. However, in asynchronous programming, tasks can be executed concurrently, and the program does not wait for each task to finish before proceeding.

<figure><img src="/files/xPrCUFWGCdvFoTW9s34k" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.pranaypourkar.co.in/the-programmers-guide/java/java-concepts/concurrency-and-multithreading/asynchronous-programming.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
