liveBook · Manning

Async/await

Also called async and await keywords

Async/await is language syntax for defining asynchronous computations that can suspend at awaited operations and resume when those operations produce results.

How 20 Manning books explain it

C# Concurrency: Asynchronous and multithreaded programming

Async/await is a C# language feature for expressing asynchronous operations with synchronous-looking control flow.

How it is used
Uses asynchronous control flow to keep clients responsive and serve many I/O-bound connections with fewer waiting threads.
How deep it goes
Explains Tasks, compiler-generated continuations, suspension, exceptions, UI interaction, performance trade-offs, and common blocking pitfalls.
Examples
Demonstrates BMP width reading, ten-file processing, web requests, UI calculations, and camera resource management.
What you can do after
Apply it via C# async methods, await, Task or Task<T>, asynchronous I/O, Task.WhenAll, and disciplined exception handling.

Read how C# Concurrency: Asynchronous and multithreaded programming explains async/await →

Python Concurrency with asyncio

Async/await syntax is Python language syntax for declaring asynchronous functions and suspending them until awaitable operations complete.

How it is used
Coordinates asynchronous I/O, such as web requests, database queries, and network connections, while keeping applications responsive.
How deep it goes
Explains coroutine creation, suspension, event-loop execution, task scheduling, cancellation, and CPU-bound limitations.
Examples
Uses arithmetic coroutines, asyncio.sleep delays, concurrent tasks, status messages, cancellation, and generator-based coroutine syntax.
What you can do after
Build asynchronous programs with async def, await, asyncio.run, and asyncio.create_task, then cancel tasks when necessary.

Read how Python Concurrency with asyncio explains async/await →

Rust Servers, Services, and Apps

An async function is a function whose execution can suspend while awaiting asynchronous operations and later resume.

How it is used
Uses async functions for concurrent Tokio tasks and asynchronous Actix Web request handlers.
How deep it goes
Explains lazy execution, `.await`, future-returning syntax, and `Future::poll`, without implementing a runtime.
Examples
Contrasts an unawaited file-reading simulation with awaited Tokio tasks, then shows an Actix Web health-check handler.
What you can do after
Apply it via Tokio to await spawned computations and via Actix Web to define asynchronous request handlers.

Read how Rust Servers, Services, and Apps explains async/await →

Learn Rust in a Month of Lunches

async is a Rust language construct for defining computations that produce futures and can suspend while awaiting asynchronous results.

How it is used
Introduces non-blocking waits for network requests and async request handlers.
How deep it goes
Explains future output, polling, compiler errors, and Tokio’s main macro expansion, while deferring a deep explanation of Pin.
Examples
Uses a future returning eight, a reqwest request, randomly delayed values, and an Axum route handler.
What you can do after
Apply async/await with Tokio to run futures, make requests, and combine multiple waits.

Read how Learn Rust in a Month of Lunches explains async/await →

Machine Learning Platform Engineering

Async/await is a programming-language feature for expressing asynchronous operations in a sequential-looking form.

How it is used
Coordinates asynchronous model inference in API endpoints and adapts asynchronous LLM queries to synchronous evaluation tests.
How deep it goes
Shows awaited runner calls, dependent and gathered operations, and a synchronous test wrapper; does not explain event-loop internals.
Examples
Uses an image-detection endpoint, grayscale preprocessing followed by two detectors, and a helper returning LLM response text.
What you can do after
Apply it via BentoML to await inference results and via asyncio.run() to call an async LLM method from synchronous tests.

Read how Machine Learning Platform Engineering explains async/await →

The Joy of JavaScript

An async function is a JavaScript function that returns a Promise and can suspend execution while awaiting asynchronous work.

How it is used
Turns Promise chains for dependent asynchronous work into readable, step-by-step statements.
How deep it goes
Works through a chain-to-async refactor, including awaited locals and try/catch, and explains top-level module behavior without detailing module evaluation internals.
Examples
Shows file access and reading before counting blocks, plus dynamic imports during module startup.
What you can do after
Build it from scratch by refactoring a Promise chain into an async function, then consume its result with await or then.

Read how The Joy of JavaScript explains async/await →

Code Like a Pro in Rust

Async/await is syntax for defining and suspending asynchronous computations until awaited operations make progress.

How it is used
Uses Rust async/await to structure runtime-driven tasks and asynchronous client requests.
How deep it goes
Explains future laziness and polling, then works through boxed and pinned futures in an observer trait.
Examples
Demonstrates an awaited timer, a fire-and-forget task, and an observer returning a pinned future.
What you can do after
Apply it via Tokio to await operations, spawn tasks, and avoid common execution and pinning pitfalls.

Read how Code Like a Pro in Rust explains async/await →

.NET MAUI in Action

async/await is a C# language feature for composing asynchronous operations without blocking the calling thread while an operation is incomplete.

How it is used
Keeps .NET MAUI UI work responsive while database setup and queries run asynchronously.
How deep it goes
Introduces constructor-safe async initialization and awaiting database results, while deferring broader UI async patterns and traps.
Examples
Uses the MauiTodo page to start Initialize and await GetTodos, alongside asynchronous table creation and item insertion.
What you can do after
Apply it via .NET MAUI and SQLite-net to initialize and query app data without blocking the UI.

Read how .NET MAUI in Action explains async/await →

Secrets of the JavaScript Ninja, Third Edition

JavaScript syntax for expressing asynchronous control flow using async functions and await expressions.

How it is used
Expresses promise-based asynchronous tasks as sequential-looking code in request handlers and other event-driven work.
How deep it goes
Explains promise conversion, event-loop yielding, microtask resumption, fulfillment, rejection, and where await is allowed.
Examples
Uses a timer promise, a Node.js file-read handler, and an authentication-and-database request flow.
What you can do after
Apply it via Node.js fsPromises.readFile to write a non-blocking request handler with sequential-looking code.

Read how Secrets of the JavaScript Ninja, Third Edition explains async/await →

JavaScript in Depth

A JavaScript operator that suspends an async function until a promise-like value settles, then yields its result or throws its rejection.

How it is used
Explains async suspension as a source of heap retention and garbage-collection pressure under concurrent load.
How deep it goes
Descends into promises, reaction records, closures, captured scopes, scavenges, and promotion, but not await scheduling semantics beyond retention.
Examples
Uses sequential fetchUser, fetchPosts, and renderTemplate awaits to illustrate multiple suspended continuations.
What you can do after
Diagnose memory pressure by identifying promise-related objects retained while awaited operations remain pending.

Read how JavaScript in Depth explains async/await →

.NET in Action, Second Edition

The await keyword asynchronously suspends a C# method until an awaitable operation completes and then resumes it.

How it is used
Uses async/await to replace a sequential HTTP comic search with one that can have multiple requests in progress.
How deep it goes
Works through asynchronous fetch, deserialization, search, and caller code; defers remedies for slow responses and throttling.
Examples
Uses comic-fetch and title-search listings, an awaited command-line caller, and Stopwatch timing.
What you can do after
Apply it via the Task Parallel Library to issue overlapping HTTP requests and await asynchronous responses.

Read how .NET in Action, Second Edition explains async/await →

Pro ASP.NET Core 7, Tenth Edition

The C# await operator asynchronously suspends execution until an awaitable operation completes and produces its result.

How it is used
Uses async/await to write ASP.NET Core HTTP-dependent methods and actions while giving the server more flexibility to schedule requests.
How deep it goes
Works through a task-based HTTP request, its continuation-based alternative, and an asynchronous controller action, but defers deeper parallel-programming details.
Examples
Uses an HTTP page-length request, a controller that displays its result, and a multi-URL sequence consumed with await foreach.
What you can do after
Build it from scratch: write an async HTTP helper and await it from an ASP.NET Core action without using ContinueWith.

Read how Pro ASP.NET Core 7, Tenth Edition explains async/await →

Kotlin in Action, 2E

await is an operation that suspends a coroutine until an asynchronous computation's result is available.

How it is used
Coordinates independent asynchronous computations whose results must be awaited and combined.
How deep it goes
Explains Deferred creation, suspension timing, concurrency, structured cancellation, and exception propagation through await.
Examples
Uses concurrent number additions, concurrent image loading, and a Deferred that rethrows UnsupportedOperationException from await.
What you can do after
Apply it via Kotlin coroutines to run independent tasks concurrently, await their values, combine results, and catch failures.

Read how Kotlin in Action, 2E explains async/await →

Get Programming with JavaScript Next: New features of ECMAScript 2015, 2016, and beyond

A JavaScript keyword placed before function that marks the function as asynchronous and enables await inside it.

How it is used
Makes promise-based web tasks read as ordered steps without blocking the rest of the application.
How deep it goes
Defines both keywords and return behavior, then works through image fetching and rejection handling; does not develop async-function internals.
Examples
Uses image fetching, map rendering, a photo gallery that skips failed images, and an article-loading conversion exercise.
What you can do after
Apply it via JavaScript async functions to sequence promise results and keep successfully loaded gallery images when some requests fail.

Read how Get Programming with JavaScript Next: New features of ECMAScript 2015, 2016, and beyond explains async/await →

F# in Action: A Revised Edition of Get Programming with F#

Async/await is a language feature and control-flow pattern for expressing asynchronous operations in sequential-looking syntax that suspends while awaiting a result.

How it is used
Supports web, distributed, and other applications that must handle long-running, I/O-heavy, or CPU-heavy work efficiently.
How deep it goes
Explains asynchronous flow, Task, Async, awaiting syntax, and parallel composition, while deferring the full complexity of concurrency and distributed programming.
Examples
Uses synchronous-versus-asynchronous flow diagrams, Task.WhenAll, Async.Parallel, task blocks, async blocks, let!, and do!.
What you can do after
Apply it via F# task and async blocks to await values, compose workloads, and execute independent operations in parallel.

Read how F# in Action: A Revised Edition of Get Programming with F# explains async/await →

Data Pipelines with Apache Airflow, Second Edition

An asynchronous method is a callable method whose execution can suspend while awaiting an operation and allow other asynchronous work to proceed.

How it is used
Coordinates non-blocking polling inside Airflow deferrable sensors.
How deep it goes
Explains async run methods and awaited sleeps, but stops short of broader asynchronous programming internals.
Examples
Demonstrates a MovieLens trigger awaiting retries while checking for ratings and returning control after records appear.
What you can do after
Build an asynchronous Airflow trigger that waits for external data without wasting worker resources.

Read how Data Pipelines with Apache Airflow, Second Edition explains async/await →

Acing the Frontend Interview

Async/await is JavaScript syntax for expressing promise-based asynchronous control flow in a sequential-looking form.

How it is used
Supports responsive, non-blocking JavaScript applications and provides an interview framework for asynchronous programming.
How deep it goes
Defines async/await within asynchronous patterns and extends to error handling, optimization, and race-condition debugging without detailing syntax internals.
Examples
Uses a review table contrasting fundamentals, applied async/await practice, and advanced asynchronous-system skills.
What you can do after
Apply it to chain Promises, handle asynchronous errors, optimize async flows, and debug race conditions.

Read how Acing the Frontend Interview explains async/await →

The Art of Unit Testing 3e

Async/await is JavaScript syntax for expressing promise-based asynchronous control flow in a sequential-looking form.

How it is used
Uses async/await to express asynchronous website checks and keep integration tests readable.
How deep it goes
Explains promise-based syntax, contrasts callbacks, and demonstrates testing while retaining the underlying asynchronous behavior.
Examples
Demonstrates a node-fetch website check, missing-text and connectivity failures, and an awaited integration test.
What you can do after
Apply it via async functions and await-based tests that inspect asynchronous return values clearly.

Read how The Art of Unit Testing 3e explains async/await →

Building Web APIs with ASP.NET Core

The await operator asynchronously waits for a task to complete without blocking the executing thread.

How it is used
Applies nonblocking execution to ASP.NET Core actions that retrieve or write data through asynchronous Tasks.
How deep it goes
Walks through method signatures and EF Core replacements, while deferring extensive asynchronous data retrieval to later treatment.
Examples
Uses a placeholder Task.Run action and an awaited BoardGame ToArrayAsync database query.
What you can do after
Apply async/await by converting controller actions and replacing synchronous EF Core I/O methods with asynchronous counterparts.

Read how Building Web APIs with ASP.NET Core explains async/await →

Secrets of the JavaScript Ninja, Second Edition

A language keyword that pauses an async function until a promise settles and then evaluates to the promise's result or throws its rejection.

How it is used
Replaces manual generator-and-promise coordination when writing nonblocking asynchronous code.
How deep it goes
Explains the keywords’ roles and their generator-and-promise model, with a short JSON example.
Examples
Uses sequential JSON requests for ninja and mission data, with try/catch error handling.
What you can do after
Apply async/await to sequence dependent JSON requests without blocking and handle failures with try/catch.

Read how Secrets of the JavaScript Ninja, Second Edition explains async/await →

Also covered in

What to know first

Related concepts

Questions about async/await

What is async/await?

Async/await is language syntax for defining asynchronous computations that can suspend at awaited operations and resume when those operations produce results.

Which Manning books explain async/await?

C# Concurrency: Asynchronous and multithreaded programming, Python Concurrency with asyncio, Rust Servers, Services, and Apps, Learn Rust in a Month of Lunches, Machine Learning Platform Engineering, The Joy of JavaScript, Code Like a Pro in Rust, .NET MAUI in Action and 12 more.

What should I know before learning async/await?

Manning books that teach async/await usually introduce promise, asynchronous programming, thread and JavaScript first.

What is the difference between async/await and locking?

Async/await is language syntax for defining asynchronous computations that can suspend at awaited operations and resume when those operations produce results. Locking is a synchronization technique that controls concurrent access to a shared resource or protected operation.

What is async/await also called?

Async/await is also called async and await keywords.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.