liveBook · Manning

Non-blocking I/O

Non-blocking I/O is an input/output technique in which an operation returns control without requiring the initiating activity to wait for its completion.

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
Keeps a client-server application working on other connections while I/O-bound requests wait.
How deep it goes
Explains socket mode, retry behavior, busy-waiting, and notification alternatives, without detailing device-level implementation.
Examples
Uses a pizza-readiness analogy and a Python socket server that handles BlockingIOError.
What you can do after
Apply it via Python sockets to handle multiple I/O-bound connections while recognizing when repeated polling wastes CPU time.

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
Keeps I/O-bound servers responsive by letting an event loop handle other connections while an operation waits.
How deep it goes
Explains socket-readiness steps and sketches an event loop, without detailing OS polling implementations.
Examples
Uses a web server waiting on a database query and a socket-based request-and-response workflow.
What you can do after
Build it from scratch using an event-loop sketch that registers socket interest, polls for events, and dispatches handlers.

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 →

Related concepts

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.