liveBook · Manning

Thread

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

How 12 Manning books explain it

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
Structures independent execution within one process so the operating system can schedule concurrent tasks.
How deep it goes
Defines threads through process resources and OS scheduling, then works through Python creation, shared-memory trade-offs, and server use.
Examples
Uses construction crews, five Python child threads, an arcade game's tasks, and a thread-per-client server.
What you can do after
Apply it via Python threading.Thread to launch tasks and implement a thread-per-client server while accounting for shared-resource risks.

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
Enables distinct program tasks to pursue concurrent control flows while sharing state.
How deep it goes
Explains creation, joining, shared-state hazards, initialization, and liveness; defers extensive deadlock treatment.
Examples
Uses a four-worker cell-matrix game and a two-mutex deadlock scenario.
What you can do after
Build it from scratch using thrd_create and thrd_join, then check shared access, object lifetime, and liveness.

Read how Modern C, Third Edition 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 keep game updating, drawing, accounting, and input responsive as concurrent tasks.
How deep it goes
Works through creation, joining, shared-data lifetime, condition-variable waits, and detachment using thread functions and game control flow.
Examples
Shows a terminal cell game with four worker threads sharing one object, plus accounting, update, and drawing loops.
What you can do after
Build it from scratch with C thread creation and joining, while planning shared-data lifetime and protected waits.

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
Enables concurrent work within a process through units the operating system can schedule.
How deep it goes
Explains spawning, joining, scheduling, shared memory, and scaling costs, but stops short of implementing concurrency libraries.
Examples
Uses a timed two-thread sleep program, many-thread timing comparisons, and a rejected shared-write race.
What you can do after
Apply it via Rust’s `std::thread` to spawn and join workers while judging thread-count costs.

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 →

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 to connect concurrent execution with scheduling delay in low-latency applications.
How deep it goes
Defines thread-local stacks and shared resources, illustrates scheduling, and shows thread creation without detailing scheduler algorithms.
Examples
Illustrates three threads taking turns on one core and ten Rust threads created and joined.
What you can do after
Apply it via Rust std::thread::spawn() and join() while accounting for scheduling delays and shared-resource hazards.

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 →

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.