liveBook · Manning

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.

How 2 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 →

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.