liveBook · Manning

Green thread

Also called virtual threads

A green thread is a lightweight execution unit managed and scheduled by a language runtime or library, rather than directly by the operating-system kernel.

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 →

Also covered in

What to know first

Related concepts

Questions about green thread

What is green thread?

A green thread is a lightweight execution unit managed and scheduled by a language runtime or library, rather than directly by the operating-system kernel.

Which Manning books explain green thread?

Quarkus in Action and Refactoring to Rust.

What should I know before learning green thread?

Manning books that teach green thread usually introduce thread, I/O and contract first.

What is the difference between green thread and platform thread?

A green thread is a lightweight execution unit managed and scheduled by a language runtime or library, rather than directly by the operating-system kernel. A platform thread is a JVM thread backed by an operating-system thread and subject to operating-system scheduling and resource limits.

What kinds of green thread are there?

Kinds of green thread include actor.

What is green thread a kind of?

Green thread is a kind of thread. A thread is a distinct sequence of execution with its own control flow and state, managed or scheduled by a processor, runtime, or operating system.

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.