A blocking operation makes its thread wait for external data, another thread, or another condition before continuing. File access, network access, and other communication outside the CPU and memory can block; so can operations that wait for another thread. The operating system removes a blocked thread from CPU scheduling until the wait ends. section 1.1
Blocking is mainly a resource problem rather than a CPU problem. Each blocked thread still consumes memory, and managing many threads adds context-switching overhead. A program that creates too many blocked threads can become slower, exhaust memory, or crash. section 1.1 section 1.6
Prefer nonblocking asynchronous operations when work mostly waits:
- Use an asynchronous API so the thread is released while external work proceeds and resumes after completion. section 1.6
- Avoid converting asynchronous work back into blocking with Task.Wait() or Task.Result; unsupported usage can cause bugs, deadlocks, or exceptions and removes the asynchronous benefit. section 6.3.1
- Do not overload the thread pool with long-running blocking work; blocked pool threads cannot process other work efficiently. section 8.1.3
Camera capture
A synchronous camera method acquires the camera, performs a blocking capture, and releases the camera. The asynchronous version awaits TakePictureAsync before releasing it, preserving the required order without occupying the thread during the capture. section 6.3.1
Figure 1.2 Single-threaded versus multithread with multiple requests
Compare single-threaded and multithreaded handling of multiple waiting requests. section 1.1








