Skip to content

Asynchronous programming

Waiting for a result without blocking the rest of the intended workflow.

Software architecture

What is asynchronous programming?

Asynchronous programming allows a task to start and its result to be processed later. During suitable waiting phases, the program can handle other events. Network access is a common use. This implies neither automatic parallel execution nor a general promise that every operation gets faster. Computation-heavy work can still block its executing flow if it runs synchronously there.

In a fictional portal, a document upload starts. While transfer is pending, the interface can keep responding and show progress. Only appropriate confirmation allows it to report the document saved. Errors, cancellation and late responses need their own states. An early-returning function or a responsive interface therefore does not prove a successful upload.

Sources