liveBook · Manning

Thread storage duration

Thread storage duration is a C object storage duration in which an object’s lifetime is associated with a particular thread of execution.

How 2 Manning books explain it

Modern C, Third Edition

Thread storage duration is an object storage duration associated with a particular thread of execution.

How it is used
Classifies objects associated with a thread and connects storage duration to the C thread API.
How deep it goes
Defines the duration and its initialization rule but defers detailed thread-API treatment.
Examples
Uses the C23 `thread_local` spelling and the earlier `_Thread_local` spelling as concrete language constructs.
What you can do after
Evaluate/understand which initialization rule and language spelling apply to a thread-storage object.

Read how Modern C, Third Edition explains thread storage duration →

Modern C

Thread storage duration is a C storage duration in which an object's lifetime is associated with a particular thread of execution.

How it is used
Classifies objects whose lifetimes follow individual threads of execution within C's storage-duration model.
How deep it goes
Defines thread binding, lifetime boundaries, and default initialization but does not develop a thread-specific code example.
What you can do after
Evaluate whether an object's lifetime and default initialization follow a particular thread rather than another storage-duration rule.

Read how Modern C explains thread storage duration →

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.