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.
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.
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.
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
- Code Like a Pro in Rust
- Python Concurrency with asyncio
- Quarkus in Action
- Kotlin in Action, 2E
- Secrets of the JavaScript Ninja, Third EditionIn early access (MEAP)
- Go by Example
- Grokking Software ArchitectureIn early access (MEAP)
- C# Concurrency: Asynchronous and multithreaded programming
- Acing the Frontend InterviewIn early access (MEAP)
What to know first
- CPUA central processing unit (CPU) is a computer processor that executes program instructions and performs general-purpose computational operations.
- threadA thread is a distinct sequence of execution with its own control flow and state, managed or scheduled by a processor, runtime, or operating system.
- containerA software container is an isolated execution environment that packages an application and its dependencies, typically sharing the host operating-system kernel.
- I/O-bound workI/O-bound work is work whose progress or completion is primarily limited by input and output operations or waiting for external resources rather than computation.
Related concepts
- blockingcontrasts with · 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.
- concurrencyproduces · Concurrency is the structuring or execution of multiple computational activities so their progress overlaps in time, whether or not they run simultaneously.
- Actix Webused by · Actix Web is a Rust web framework for building HTTP servers, web applications, and services.
- batch sizeuses · Batch size is the number of items grouped for processing together in a single batch or computational operation.
- bufferinguses · Buffering is the temporary storage of data between processing or transfer steps, often to accommodate differences in rates or reduce operation costs.
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.




