I/O-bound work is work whose progress primarily depends on the speed of an input/output subsystem rather than the CPU. File access, database access, and network TCP/HTTP requests are typical cases. section 10.1 section 10.3
While a task waits for a disk, network socket, or timer, an asynchronous runtime such as Tokio can schedule another asynchronous task. When the external operation completes, the waiting task resumes. section 10.3
Recognize I/O-bound work through its external waits:
- Reading from or writing to a file section 10.3
- Waiting for bytes on a network connection or processing HTTP requests section 10.1 section 10.3
- Accessing a database or waiting for a timer to complete section 10.1 section 10.3
Concurrent file reads with Tokio
Two file-reading futures can be spawned and joined. Each task waits independently, allowing the runtime to process the other task instead of leaving the processor idle. The sample output shows file 2 completing before file 1, despite both tasks starting together. section 10.3
Use the HTTP request-processing diagram to compare asynchronous handling of I/O waits with thread-per-connection processing. section 10.1
I/O-bound work is a candidate for asynchronous execution, but the guideline is broad and has exceptions. CPU-bound work, such as complex number-crunching, is limited by processor speed instead. section 10.3




