Struct ThreadSafeEntityCache::AppDependenciesSnapshot

Nested Relationships

This struct is a nested type of Class ThreadSafeEntityCache.

Struct Documentation

struct AppDependenciesSnapshot

Atomic snapshot of an App together with its declared depends_on apps.

handle_app_depends_on iterates app.depends_on and resolves each id via get_app() - one shared_lock per dependency. A writer refresh can land between the app fetch and any of the per-dependency fetches, so a 5-dependency app can return 5 apps from 5 different cache generations. This helper takes a single shared_lock and returns the app together with every dependency resolved in the same generation.

app is empty if app_id is not in the cache. dependencies lists every entry in app->depends_on in declaration order; the optional is empty when the referenced dependency cannot be resolved (broken ref).

Public Members

std::optional<App> app
std::vector<std::pair<std::string, std::optional<App>>> dependencies