A logical thread is a user-level thread managed by an application, runtime, or library rather than directly by the operating system. The OS sees the application as a single-threaded process, while the runtime organizes several tasks within it. These threads commonly support cooperative multitasking: each task explicitly yields control so another task can run. section 12.3
Logical threads trade operating-system control for lightweight, cooperative task management:
- Use fewer resources: switching tasks can cost little more than calling a function, making millions of coroutines possible without significant management overhead. section 12.5
- Avoid interrupting critical sections by choosing explicit points where tasks may hand control to one another. section 12.5
- Require disciplined yielding: a long-running task can prevent every other task from running because the scheduler cannot forcibly take control. section 12.3 section 12.5
Many I/O tasks on one worker
A server can use a small number of operating-system threads to coordinate many I/O-related tasks. Each task performs a small portion of work, yields, and later resumes. This can improve resource utilization and scalability, provided no task holds control for too long. section 12.5 section 12.12
Logical threads are one implementation of asynchronous systems. Coroutines represent partially executed functions that pause and resume, while futures represent results that are not yet available. section 12.12


