liveBook · Manning

Multithreading

Also called multithreaded, threading

Multithreading is the execution of multiple threads of control within a program, concurrently through interleaving or simultaneously.

How 11 Manning books explain it

Rust Servers, Services, and Apps

Multithreading is a technique for executing multiple threads of control within a process, potentially in parallel or through interleaving.

How it is used
Uses multithreading to handle concurrent web-service work and to contrast OS threads with async I/O.
How deep it goes
Works through spawning and joining threads for simulated file reads, then identifies Actix worker defaults; does not detail thread scheduling internals.
Examples
Compares sequential and spawned four-second and two-second file reads, and uses Actix worker threads as a server example.
What you can do after
Apply it via Rust `thread::spawn` and `join`, and evaluate/understand how Actix workers handle parallel server work.

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

Python Concurrency with asyncio

Multithreading is a concurrency technique in which multiple threads execute within a process and share its memory.

How it is used
Deploys threads to overlap blocking I/O, integrate synchronous libraries with asyncio, and support responsive applications.
How deep it goes
Explains thread creation, joining, GIL constraints, shared-memory races, locks, pools, deadlocks, and selected GIL-releasing workloads.
Examples
Demonstrates hello-world threads, concurrent requests with progress tracking, Fibonacci timing, and NumPy row means.
What you can do after
Apply it via threading, ThreadPoolExecutor, asyncio, and Lock to run blocking work concurrently and synchronize shared state.

Read how Python Concurrency with asyncio explains multithreading →

C# Concurrency: Asynchronous and multithreaded programming

The execution of multiple threads within a program, either concurrently through interleaving or simultaneously on multiple processor cores.

How it is used
Uses parallel or background execution to improve completion time, responsiveness, server capacity, or perceived performance.
How deep it goes
Explains interleaving, cores, context switching, thread pools, continuations, performance costs, and classic synchronization failures.
Examples
Demonstrates pizza and web-server workflows, multicore scheduling, ten-file processing, parallel calculations, and responsive WinForms updates.
What you can do after
Apply multithreading with Task.Run, compare it with asynchronous I/O, preserve UI responsiveness, and identify common concurrency hazards.

Read how C# Concurrency: Asynchronous and multithreaded programming explains multithreading →

C++ Concurrency in Action, Second Edition

A programming technique in which a program uses multiple threads of execution within a process.

How it is used
Uses multiple threads within a process to separate responsibilities or perform concurrent work.
How deep it goes
Works through thread creation and joining, then identifies synchronization and work-division decisions without detailing their implementations.
Examples
Uses a C++ greeting launched with std::thread and joined from main(), plus separate threads for media playback and user input.
What you can do after
Build it from scratch as a simple C++ program using std::thread and join(), and evaluate when additional threads are worthwhile.

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

Fast Python: High performance techniques for large datasets

How it is used
Uses threads to manage concurrent MapReduce jobs and configure Dask workers, while examining their suitability for performance.
How deep it goes
Explains concurrency, the GIL, native-code escape routes, and worker configuration, but supplies no benchmark results in the available evidence.
Examples
Uses a threaded MapReduce executor and Dask worker configurations to illustrate thread deployment.
What you can do after
Evaluate multithreading against multiprocessing and native-code parallelism for Python workloads.

Read how Fast Python: High performance techniques for large datasets explains multithreading →

Software Design for Python Programmers

A multithreaded program is a program whose execution can involve multiple concurrent threads of control.

How it is used
Uses simultaneous operations such as producer–consumer queues and shared-resource access to motivate synchronization design.
How deep it goes
Explains concurrency, parallelism, critical regions, mutex locking, and practical risks, but only briefly introduces broader Python facilities.
Examples
Demonstrates unsynchronized and mutex-protected Python printing with three threads, shared output, locking, joining, and varied scheduling.
What you can do after
Apply it via Python's threading module to create, start, join, and synchronize threads around shared resources.

Read how Software Design for Python Programmers explains multithreading →

Server-Side WebAssembly

Multithreading is the concurrent execution of multiple threads within a process or application.

How it is used
Frames multithreading support as a key constraint when assessing Wasm for concurrent server workloads.
How deep it goes
Explains the limitation through a concurrent-client latency benchmark and CPU-core utilization, then defers Kubernetes deployment details.
Examples
Uses a SQL-backed service stressed by 50 concurrent clients and compares Wasm with Docker CPU utilization and latency.
What you can do after
Evaluate/understand when Wasm's threading limitation harms PaaS throughput and when per-request instances or Kubernetes scaling can reduce the effect.

Read how Server-Side WebAssembly explains multithreading →

Learn Concurrent Programming with Go

Multithreading is a programming approach in which multiple threads execute concurrently within a single process or application.

How it is used
Uses multiple threads to share application memory and handle independent work concurrently.
How deep it goes
Explains thread structure, resource costs, shared memory, and risks, but does not detail synchronization mechanisms.
Examples
Illustrates a sports-score service with a stream-reader thread, client-handler threads, shared scores, and a dynamic thread pool.
What you can do after
Evaluate when lightweight shared-memory execution suits concurrent server work and recognize its isolation and coordination costs.

Read how Learn Concurrent Programming with Go explains multithreading →

Functional Design and Architecture: Examples in Haskell

Multithreading is the concurrent execution of multiple threads within a process.

How it is used
Frames multithreading as an architectural concern for readable, maintainable concurrent applications and general-purpose web or CLI frameworks.
How deep it goes
Explains major failure modes and state primitives, then stops short of comprehensive multithreading internals while comparing STM with bare threads.
Examples
Uses race conditions, deadlocks, livelocks, starvation, leakage, overflow, and exception-handling failures as concrete problem cases.
What you can do after
Diagnose concurrency risks, choose among IORefs, MVars, and STM TVars, and organize threads with safer resource handling.

Read how Functional Design and Architecture: Examples in Haskell explains multithreading →

Object-Oriented Software Design in C++

Multithreading is the concurrent execution of multiple independently schedulable threads within a program.

How it is used
Uses multithreading to exploit multicore execution and support applications requiring simultaneous operations.
How deep it goes
Introduces threads, concurrency, parallelism, mutexes, and condition variables, but stops short of comprehensive implementation guidance.
Examples
Uses a printing example, a dinner-party analogy, and a singleton initialization race to illustrate synchronization problems.
What you can do after
Apply mutexes and condition variables to protect shared resources and coordinate multiple threads.

Read how Object-Oriented Software Design in C++ explains multithreading →

Refactoring to Rust

Multithreaded computation is the execution of computational work across multiple threads within a program.

How it is used
Deploys parallel workers for calculations and tasks blocked by resource constraints or external libraries.
How deep it goes
Explains operating-system threads, worker throughput, completion ordering, and Python’s limits, but defers the runtime mechanism requiring Rust.
Examples
Uses eight Mandelbrot image calculations submitted to a four-worker ThreadPoolExecutor.
What you can do after
Apply multithreading via Python’s ThreadPoolExecutor and coordinate submitted work with asyncio.gather.

Read how Refactoring to Rust explains multithreading →

Also covered in

What to know first

Related concepts

Questions about multithreading

What is multithreading?

Multithreading is the execution of multiple threads of control within a program, concurrently through interleaving or simultaneously.

Which Manning books explain multithreading?

Rust Servers, Services, and Apps, Python Concurrency with asyncio, C# Concurrency: Asynchronous and multithreaded programming, C++ Concurrency in Action, Second Edition, Fast Python: High performance techniques for large datasets, Software Design for Python Programmers, Server-Side WebAssembly, Learn Concurrent Programming with Go and 3 more.

What should I know before learning multithreading?

Manning books that teach multithreading usually introduce thread, CPU, multicore and locking first.

What is the difference between multithreading and asynchronous programming?

Multithreading is the execution of multiple threads of control within a program, concurrently through interleaving or simultaneously. Asynchronous programming structures operations so that the initiating execution can continue or yield control without synchronously waiting for each operation to complete.

What is multithreading a kind of?

Multithreading is a kind of concurrency. Concurrency is the structuring or execution of multiple computational activities so their progress overlaps in time, whether or not they run simultaneously.

What is multithreading also called?

Multithreading is also called multithreaded or threading.

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.