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.
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.
Related concepts
- storage durationkind of · Storage duration is the C property that determines how long an object exists during program execution and how its storage is managed.
- durationkind of · A duration is an amount or span of time, expressed as an interval or in temporal units.
- threadconfigures · A thread is an execution sequence or context within a program or process that represents a unit of work and can run or be scheduled independently of other threads.
Questions about thread storage duration
What is 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.
Which Manning books explain thread storage duration?
Modern C, Third Edition and Modern C.
What is thread storage duration a kind of?
Thread storage duration is a kind of storage duration. Storage duration is the C property that determines how long an object exists during program execution and how its storage is managed.
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.

