liveBook · Manning

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.

How 2 Manning books explain it

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.

Read how Quarkus in Action explains green thread →

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.

Read how Refactoring to Rust explains green thread →

Related concepts

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.