liveBook · Manning

Single-threaded execution model

Also called single-threaded model

A single-threaded execution model runs program work on one thread of control at a time, potentially interleaving progress among tasks.

How 3 Manning books explain it

Python Concurrency with asyncio

A single-threaded concurrency model is a concurrency design in which one thread interleaves progress among multiple tasks.

How it is used
Deploys one event-loop thread to overlap non-blocking I/O tasks in asyncio applications.
How deep it goes
Explains task scheduling, CPU-bound blocking, and await-related races, while deferring process-pool execution details.
Examples
Uses CPU-bound counting loops, delay tasks, shared counters, socket dictionaries, echo servers, and asyncio locks.
What you can do after
Apply it via asyncio to overlap I/O tasks, recognize event-loop blocking, and protect suspended shared-state workflows.

Read how Python Concurrency with asyncio explains single-threaded execution model →

Grokking Simplicity

A single-threaded runtime is an execution environment in which program actions execute on one thread at a time.

How it is used
Simplifies browser JavaScript timelines and supports reasoning about asynchronous callbacks, shared resources, and coordination.
How deep it goes
Defines event-loop execution, simplifies timeline diagrams, and implements coordination, but does not eliminate asynchronous ordering problems.
Examples
Uses dinner actions, browser events, add-to-cart callbacks, timeline diagrams, and a Cut completion counter.
What you can do after
Diagnose asynchronous ordering issues and coordinate shared work using JavaScript’s sequential callback execution.

Read how Grokking Simplicity explains single-threaded execution model →

Secrets of the JavaScript Ninja, Third Edition

Single-threaded execution means JavaScript code executes in one thread of control at a time.

How it is used
Processes browser events one at a time, providing the execution model for event-handler work.
How deep it goes
Defines single-threaded execution and outlines event-queue processing; defers detailed event-loop behavior.
Examples
Uses a one-teller bank line analogy and cites clicks, key presses, and fetch events.
What you can do after
Diagnose why lengthy event handlers leave web applications unresponsive by tracing queued events waiting their turn.

Read how Secrets of the JavaScript Ninja, Third Edition explains single-threaded execution model →

Also covered in

What to know first

Related concepts

Questions about single-threaded execution model

What is single-threaded execution model?

A single-threaded execution model runs program work on one thread of control at a time, potentially interleaving progress among tasks.

Which Manning books explain single-threaded execution model?

Python Concurrency with asyncio, Grokking Simplicity and Secrets of the JavaScript Ninja, Third Edition.

What should I know before learning single-threaded execution model?

Manning books that teach single-threaded execution model usually introduce thread and resource first.

What is single-threaded execution model a kind of?

Single-threaded execution model is a kind of execution model. An execution model is an abstract set of rules describing how a computational system organizes, triggers, orders, and carries out computations.

What is single-threaded execution model also called?

Single-threaded execution model is also called single-threaded model.

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.