liveBook · Manning

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.

How 17 Manning books explain it

GPU Programming with Triton

A CPU thread is an independently schedulable sequence of instructions executed by a CPU.

How it is used
Connects GPU hardware execution to Triton’s block-level programming model.
How deep it goes
Explains thread scheduling, warp divergence, latency hiding, and register-concurrency trade-offs without requiring explicit per-thread coordination in Triton.
Examples
Uses ReLU branching and an H100 register budget to illustrate divergence and thread concurrency.
What you can do after
Evaluate and understand how divergence and per-thread register use can affect GPU throughput.

Read how GPU Programming with Triton explains thread →

CUDA for LLMs

A CPU thread is an operating-system-managed execution context that runs instructions on a CPU.

How it is used
Contrasts OS-managed CPU threads with lightweight CUDA threads when introducing GPU parallelism.
How deep it goes
Briefly characterizes CPU threads, while developing CUDA indexing and kernel launches; defers deeper GPU architecture.
Examples
Illustrates GPU threads with vector addition and naive matrix multiplication, assigning output elements to individual threads.
What you can do after
Evaluate and understand the distinction between CPU and CUDA threads and how GPU thread indices map to data.

Read how CUDA for LLMs explains thread →

Grokking Concurrency

A thread is an independently schedulable sequence of execution within a process that typically shares the process's memory and resources.

How it is used
Uses threads as schedulable units for structuring concurrent tasks within a process.
How deep it goes
Explains scheduling, shared resources, and process trade-offs; demonstrates Python thread creation while deferring synchronization details.
Examples
Illustrates shared resources with a construction crew and starts five child threads in Python.
What you can do after
Apply threads via Python’s threading module to start concurrent tasks and inspect active threads.

Read how Grokking Concurrency explains thread →

Modern C, Third Edition

A thread of execution is an independently schedulable sequence of program operations within a running program.

How it is used
Organizes concurrent control flow around tasks that interact through shared state.
How deep it goes
Explains thread creation, joining, shared-state safety, initialization, and liveness precautions, while deferring an extensive treatment of parallel and distributed computing.
Examples
Uses a cellular game with drawing, input, updating, and neighbor-counting tasks, plus two threads locking mutexes in opposite orders.
What you can do after
Apply threads via C's thrd_create and thrd_join, and evaluate shared-state and liveness hazards.

Read how Modern C, Third Edition explains thread →

Grokking GPU Programming

A thread is a sequence of instructions that performs a unit of computation.

How it is used
Introduces threads as independent workers for data-parallel GPU kernels.
How deep it goes
Explains launch hierarchy, global indexing, bounds checks and block scheduling, with a brief account of warps and execution overhead.
Examples
Uses an eight-thread greeting, vector addition and one-thread-per-output matrix multiplication.
What you can do after
Apply it via CUDA to assign work to threads, calculate indices, guard bounds and check launch errors.

Read how Grokking GPU Programming explains thread →

Modern C

A thread is an independent sequence of execution within a program that has its own control flow and can execute concurrently or by interleaving with other threads.

How it is used
Uses threads to divide a responsive cellular game into concurrent tasks.
How deep it goes
Explains creation, joining, shared-state protection, waiting, and detached-thread cleanup through worked C examples.
Examples
Uses a cellular game with drawing, input, update, and neighbor-counting tasks, plus a dynamically initialized error log.
What you can do after
Apply C thread interfaces to start and join tasks, protect shared state, and coordinate waiting threads.

Read how Modern C explains thread →

C++ Concurrency in Action, Second Edition

A unit of execution within a process that can run independently of other threads.

How it is used
Uses threads to separate concurrent responsibilities and introduce C++ thread management.
How deep it goes
Works through launching a std::thread and waiting with join(), while deferring fuller thread management and shared-data protection.
Examples
Uses a DVD player’s playback and user interface, plus a Hello World program that starts and joins a second thread.
What you can do after
Build it from scratch: launch a C++ thread with an entry function and join it before main() exits.

Read how C++ Concurrency in Action, Second Edition explains thread →

Rust Servers, Services, and Apps

A thread is an independently schedulable sequence of instructions within a process that can execute concurrently with other threads.

How it is used
Uses operating-system threads to run independent work concurrently when a blocking operation would otherwise hold up subsequent work.
How deep it goes
Works through sequential and spawned-thread implementations with joins, but stops short of shared-state synchronization.
Examples
Runs two simulated file reads with four- and two-second delays, then joins their thread handles.
What you can do after
Build it from scratch with std::thread::spawn and join to run independent blocking operations concurrently.

Read how Rust Servers, Services, and Apps explains thread →

Rust in Action: Systems programming concepts and techniques

A thread of execution is a sequence of CPU instructions intended to execute serially within a running program.

How it is used
Introduces operating-system threads as a way to run concurrent tasks and use multiple CPU cores.
How deep it goes
Explains spawning, scheduling, isolation, and performance trade-offs, while stopping short of implementing concurrency libraries.
Examples
Uses two sleeping threads, competing writes, and sleep-versus-spin timing experiments to illustrate behavior and costs.
What you can do after
Apply it via Rust's standard library to spawn threads and wait for their completion.

Read how Rust in Action: Systems programming concepts and techniques explains thread →

The Well-Grounded Rubyist, Fourth Edition

Thread is Ruby's class for creating and controlling threads of execution.

How it is used
Keeps Ruby code responsive while another task waits, particularly when a server handles multiple client connections.
How deep it goes
Works through creation, joining, lifecycle control, state checks, and variable behavior while leaving native-versus-green threading internals black-boxed.
Examples
Uses a sleeping thread, a missing-file task, and a date server whose clients can pause before replying.
What you can do after
Build it from scratch: start and join Ruby threads, then give each server connection its own thread.

Read how The Well-Grounded Rubyist, Fourth Edition explains thread →

Spring Start Here, Second Edition

A thread is an independently schedulable execution unit that runs instructions within an application process.

How it is used
Uses request threads to contrast sequential business flows with reactive task scheduling and explain blocking during service calls.
How deep it goes
Explains request-level execution, sequential tasks, and I/O waits without detailing lower-level scheduling internals.
Examples
Uses a banking debt calculation involving internal and external service calls before summing balances.
What you can do after
Evaluate whether a sequential request flow leaves its thread blocked while waiting on service I/O.

Read how Spring Start Here, Second Edition explains thread →

Refactoring to Rust

A thread is an execution context within a process that includes a program counter, execution state, and access to process resources.

How it is used
Uses threads to keep work progressing while tasks wait and to increase throughput across processor cores.
How deep it goes
Defines threads, explains scheduling and blocking, and contrasts asynchronous execution with Python's interpreter lock.
Examples
Demonstrates CPU scheduling, a can-crusher analogy, and asynchronous Mandelbrot image generation with varied completion times.
What you can do after
Apply it via asyncio and ThreadPoolExecutor to schedule multiple tasks and interpret blocking, ordering, and timing behavior.

Read how Refactoring to Rust explains thread →

100 Go Mistakes and How to Avoid Them

A thread is the smallest unit of execution that an operating system schedules within a process.

How it is used
Explains OS threads as execution resources in Go scheduling and worker-pool sizing.
How deep it goes
Defines thread scheduling and context switching, then contrasts OS threads with goroutines without detailing scheduler internals.
Examples
Uses a four-core worker-pool scenario and a diagram of running, runnable, and waiting goroutines.
What you can do after
Understand how OS threads relate to goroutine execution and workload-dependent worker-pool sizing.

Read how 100 Go Mistakes and How to Avoid Them explains thread →

Kotlin in Action, 2E

A thread is an independently schedulable sequence of execution within a process.

How it is used
Frames threads as the classic JVM mechanism for concurrent and parallel execution before motivating coroutines.
How deep it goes
Explains creation, resource costs, blocking, and coordination limits, then stops short of detailed thread lifecycle mechanics.
Examples
Uses Kotlin’s thread function and a sequential login, user-data loading, and display workflow to show creation and blocking.
What you can do after
Evaluate thread-based designs by identifying resource costs, blocking waits, and coordination difficulties, then compare them with suspending functions.

Read how Kotlin in Action, 2E explains thread →

Latency

A thread is a schedulable sequence of instructions that represents a unit of execution within a process.

How it is used
Uses threads for concurrent execution within processes, with attention to low-latency request processing.
How deep it goes
Explains thread resources, scheduling and creation APIs, without detailing real scheduler algorithms.
Examples
Illustrates three threads sharing one core and a Rust program spawning and joining ten threads.
What you can do after
Apply thread creation and joining with Rust’s standard library, and configure CPU affinity through pthread_setaffinity_np().

Read how Latency explains thread →

Learn Rust in a Month of Lunches

A thread is an independently scheduled execution path within a program that can run concurrently with other threads.

How it is used
Runs independent work concurrently on modern computers with multiple cores.
How deep it goes
Explains OS threads, spawning, joining, and lifetime constraints through runnable examples.
Examples
Demonstrates one printer, ten competing printers, shutdown panics, busy work, and the std::thread::spawn signature.
What you can do after
Operate threads with std::thread::spawn and JoinHandle::join, using move when captured data must satisfy thread lifetimes.

Read how Learn Rust in a Month of Lunches explains thread →

Fast by Default

A background thread is an execution thread that performs work independently of the primary interface thread.

How it is used
Keeps interface rendering and input responsive by relocating expensive processing, network handling, decoding, and storage work.
How deep it goes
Explains workload placement and profiling signals, but stops short of specifying thread APIs or synchronization mechanics.
Examples
Uses scrolling with 1.4 seconds of image decoding and profiler call trees to demonstrate workload relocation.
What you can do after
Diagnose thread-related responsiveness problems with profilers and relocate non-interface work off the main thread.

Read how Fast by Default explains thread →

Also covered in

What to know first

Related concepts

Questions about thread

What is 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.

Which Manning books explain thread?

GPU Programming with Triton, CUDA for LLMs, Grokking Concurrency, Modern C, Third Edition, Grokking GPU Programming, Modern C, C++ Concurrency in Action, Second Edition, Rust Servers, Services, and Apps and 9 more.

What should I know before learning thread?

Manning books that teach thread usually introduce CPU, workflow, parallelism and concurrency first.

What is thread part of?

Thread is part of workflow. A workflow is an organized sequence of coordinated activities or tasks through which work progresses toward a defined outcome.

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.