Synchronize concurrent access

Synchronize concurrent access in C++ — with the four heights of help laid out: do it now, make it easier for the next person to accept, work out the right move when you are stuck, and learn the pattern so it stops coming back.

4prompt heights
Open it in the interactive atlas →

The four heights

The same task, four distances: today's deadline, the next reviewer, the stuck moment, the pattern.

Execute — do the immediate task

+
Concurrent access to the resource cache is causing sporadic crashes. Make access safe: identify all…
Concurrent access to the resource cache is causing sporadic crashes. Make access safe: identify all call sites that read or write the cache, protect mutations with a single shared mutex and expose a const access function that uses shared locks for readers. Run the multithreaded unit tests and the server soak for an hour. Coordinate with Mei who added async loading; commit to branch sync/cache-fix and ask her to validate.

Improve — make it easier to accept

+
Before I submit the synchronization change, make it easy for reviewers: document which functions…
Before I submit the synchronization change, make it easy for reviewers: document which functions are read-only, which mutate, and which must be called from the main thread. Show a short example of correct usage and a failing example that previously caused a crash. Highlight potential deadlock chains and how the chosen lock ordering prevents them.

Decide — diagnose the stuck moment

+
Nightly load tests show the resource cache sometimes returns stale or invalid objects when many…

A nightly test shows inconsistent cache returns only under load

Nightly load tests show the resource cache sometimes returns stale or invalid objects when many threads are loading assets. I own the loader and Elena owns the cache; I fear a missing memory barrier or inadequate locking. I cannot tell whether the bug is missing synchronization at insertion, a publication problem, or a lifetime issue. What is the most likely cause and the fastest test to confirm and fix it?

Become — change the pattern

+
Across multiple features we keep getting concurrency bugs because teams assume different rules for…

We repeatedly get concurrency bugs from unclear access rules

Across multiple features we keep getting concurrency bugs because teams assume different rules for who may touch the cache and when. Each fix adds ad-hoc locks and complexity. Where exactly are we losing time and trust, and what single habit or minimal policy will prevent these ad-hoc synchronizations from proliferating? Include one enforcement step for PRs.

Next to this one

Other programming language work people do in C++.

Every task here came from the work, not from a feature list — which is why the prompts name what you want done and never the button that does it. The tool changes; the work does not.
Copyright © LLOS.ai · 2026 — original pedagogy, voice, and design — all rights reserved.

The rest of the map

Same library, five ways in.