liveBook · Manning

Non-blocking I/O

Also called asynchronous i/o, nonblocking I/O, nonblocking operation, Async I/O

Non-blocking I/O is an input/output technique that lets the initiating execution continue without waiting for the I/O operation to complete.

How 5 Manning books explain it

Rust Servers, Services, and Apps

Non-blocking I/O allows computation to continue without waiting synchronously for an input or output operation to complete.

How it is used
Supports responsive, concurrent HTTP services whose requests spend time waiting on network or database I/O.
How deep it goes
Explains thread behavior during I/O waits and shows an async handler signature, without detailing how I/O scheduling works.
Examples
Uses an Actix /health route and async response handler, alongside an I/O-heavy service that uses SQLx and PostgreSQL.
What you can do after
Apply it via Actix Web and SQLx to structure network and database access asynchronously.

Read how Rust Servers, Services, and Apps explains non-blocking I/O →

Grokking Concurrency

Nonblocking I/O is an input/output technique in which an operation returns control without waiting for its external operation to complete.

How it is used
Uses non-blocking I/O to handle multiple network clients while reducing time spent waiting on I/O.
How deep it goes
Explains immediate returns, retries, busy-waiting, readiness notification, and background completion across I/O models.
Examples
Uses a pizza-checking analogy and a Python socket server that polls for client operations.
What you can do after
Apply it via Python sockets by setting non-blocking mode and retrying operations that raise BlockingIOError.

Read how Grokking Concurrency explains non-blocking I/O →

Functional Programming in Scala, Second Edition

Non-blocking asynchronous I/O performs external input and output without waiting synchronously for each operation to complete.

How it is used
Deploys callbacks and compositional effects to perform external I/O without synchronously waiting for each operation.
How deep it goes
Explains callback representations, monadic adaptation, and interpreter choice, but leaves library-specific asynchronous implementation details abstract.
Examples
Uses callback-based byte sources, nonblockingRead, sequenced 1024-byte reads, and a Console program converted into Par.
What you can do after
Build it from scratch by adapting callback-based byte operations into Par and sequencing them through Free.

Read how Functional Programming in Scala, Second Edition explains non-blocking I/O →

Latency

A non-blocking operation allows execution to continue without waiting for the operation to complete.

How it is used
Uses non-blocking operations to support event-driven concurrency in I/O-bound applications.
How deep it goes
Explains event polling, handler constraints, and socket readiness through implementation sketches.
Examples
Illustrates socket acceptance, reading, and response writing, alongside a database query resumed on completion.
What you can do after
Evaluate how non-blocking event handling can keep an I/O-bound server responsive while operations are pending.

Read how Latency explains non-blocking I/O →

Rust in Action: Systems programming concepts and techniques

Non-blocking I/O allows a thread to continue executing while it waits for input or output data.

How it is used
Deploys continued thread execution and queued polling for programs handling multiple I/O operations.
How deep it goes
Defines blocking behavior, queued polling, asynchronous control flow, and performance rationale without detailing APIs or implementation code.
Examples
Uses multiple sockets, batched queues, periodic polling, device-driver signals, and functions returning in another thread.
What you can do after
Understand it as a way to keep threads productive during I/O waits and evaluate its complexity and runtime trade-offs.

Read how Rust in Action: Systems programming concepts and techniques explains non-blocking I/O →

Also covered in

What to know first

Related concepts

Questions about non-blocking I/O

What is non-blocking I/O?

Non-blocking I/O is an input/output technique that lets the initiating execution continue without waiting for the I/O operation to complete.

Which Manning books explain non-blocking I/O?

Rust Servers, Services, and Apps, Grokking Concurrency, Functional Programming in Scala, Second Edition, Latency and Rust in Action: Systems programming concepts and techniques.

What should I know before learning non-blocking I/O?

Manning books that teach non-blocking I/O usually introduce CPU, thread, container and I/O-bound work first.

What is the difference between non-blocking I/O and blocking?

Non-blocking I/O is an input/output technique that lets the initiating execution continue without waiting for the I/O operation to complete. Blocking is execution behavior in which an operation or execution path cannot make progress until a required event, condition, resource, or other operation is available or complete.

What is non-blocking I/O also called?

Non-blocking I/O is also called asynchronous i/o, nonblocking I/O, nonblocking operation or Async I/O.

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.