Green thread
A green thread is a lightweight user-space execution unit whose scheduling and context switching are managed by a runtime and multiplexed onto operating-system threads.
Quarkus in Action
A virtual thread is a lightweight JVM-managed thread designed to support large numbers of concurrent tasks with lower resource overhead than traditional platform threads.
- How it is used
- Offers an imperative option for scaling I/O-heavy Quarkus applications alongside reactive programming.
- How deep it goes
- Explains carrier-thread scheduling, per-task creation, Quarkus annotation, and performance limits without detailing scheduler implementation.
- Examples
- Shows a Quarkus REST method annotated with `@RunOnVirtualThread` and logs showing a new virtual thread on each call.
- What you can do after
- Apply it via Quarkus `@RunOnVirtualThread` while checking whether pinning or CPU-bound work undermines the intended benefit.
Refactoring to Rust
A green thread is a runtime- or language-managed execution unit scheduled internally rather than directly by the operating system.
- How it is used
- Explains how language-managed execution supports asynchronous and multithreaded computation.
- How deep it goes
- Defines runtime management and contrasts it with POSIX threads, but stops short of implementation internals.
- Examples
- Uses a crusher analogy and a Python ThreadPoolExecutor example to illustrate execution capacity and throughput.
- What you can do after
- Evaluate whether language-managed threads or operating-system threads fit a concurrency and parallelism problem.
Related concepts
- JavaScript runtimeuses · A JavaScript runtime is an execution environment that runs JavaScript code and provides the language engine and host APIs needed to interact with its platform.
- carrier threaduses · A carrier thread is a platform thread that executes a virtual thread while the virtual thread is mounted on it.
- @RunOnVirtualThreadconfigured by · @RunOnVirtualThread is a Quarkus annotation that directs an annotated method or class's methods to execute on virtual threads.
- work stealinguses · Work stealing is a dynamic scheduling strategy that redistributes pending tasks to idle workers to balance workloads and improve utilization.
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.

