liveBook · Manning

Shared resource

A shared resource is data, an object, or another resource that multiple people, components, or execution contexts can access or use.

How 3 Manning books explain it

Grokking Concurrency

A shared object is a data or resource object accessed by multiple concurrent execution threads.

How it is used
Enables threads or concurrent tasks to exchange data through shared memory or storage.
How deep it goes
Explains access hazards, synchronization costs, and alternatives, but does not provide synchronization implementation steps.
Examples
Uses a process address space shared by threads and a NAS volume for MapReduce intermediate data.
What you can do after
Evaluate when shared data needs synchronization and when message passing could avoid shared memory.

Read how Grokking Concurrency explains shared resource →

Modern C, Third Edition

A shared object is an object whose storage and value can be accessed by more than one thread.

How it is used
Coordinates initialization, access, protection, and destruction when multiple threads use the same object.
How deep it goes
Explains initialization ordering, one-time initialization, cleanup, and protection choices, but does not develop memory-model internals.
Examples
Demonstrates a shared error log initialized with call_once and finalized through atexit or at_quick_exit handlers.
What you can do after
Operate shared C objects safely by ordering initialization, guarding one-time setup, protecting critical sections, and arranging cleanup.

Read how Modern C, Third Edition explains shared resource →

Pro Angular 16

A shared object is an object instance made available to multiple application components so they can access common state or behavior.

How it is used
Coordinates common discount state and behavior between Angular components in a product-table application.
How deep it goes
Explains object creation, input passing, getters, setters, and two-way binding, but stops short of service injection.
Examples
Uses DiscountService, a discount editor, a discount display, and a product-table template.
What you can do after
Build shared component state by creating one object and passing it through Angular input properties.

Read how Pro Angular 16 explains shared resource →

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.