clang 23.0.0git
clang::dependencies::DependencyScanningFilesystemSharedCache::InProgressEntry Struct Reference

In-flight slot used to dedup concurrent producers for the same key. More...

#include "clang/DependencyScanning/DependencyScanningFilesystem.h"

Public Member Functions

void publish (llvm::ErrorOr< const CachedFileSystemEntry * > R)
 Publishes the producer's outcome to this slot and wakes all waiters.

Public Attributes

std::mutex Mutex
std::condition_variable CondVar
bool Done = false
llvm::ErrorOr< const CachedFileSystemEntry * > Result = std::error_code{}

Detailed Description

In-flight slot used to dedup concurrent producers for the same key.

The producer publishes via publish(); waiters block on Mutex/CV until Done is set. Result holds the resolved entry, or an uncached-negative error shared with overlapping waiters but not persisted in the shard.

Definition at line 164 of file DependencyScanningFilesystem.h.

Member Function Documentation

◆ publish()

void clang::dependencies::DependencyScanningFilesystemSharedCache::InProgressEntry::publish ( llvm::ErrorOr< const CachedFileSystemEntry * > R)
inline

Publishes the producer's outcome to this slot and wakes all waiters.

Definition at line 171 of file DependencyScanningFilesystem.h.

References CondVar, Done, Mutex, and Result.

Member Data Documentation

◆ CondVar

std::condition_variable clang::dependencies::DependencyScanningFilesystemSharedCache::InProgressEntry::CondVar

Definition at line 166 of file DependencyScanningFilesystem.h.

Referenced by publish().

◆ Done

bool clang::dependencies::DependencyScanningFilesystemSharedCache::InProgressEntry::Done = false

Definition at line 167 of file DependencyScanningFilesystem.h.

Referenced by publish().

◆ Mutex

std::mutex clang::dependencies::DependencyScanningFilesystemSharedCache::InProgressEntry::Mutex

Definition at line 165 of file DependencyScanningFilesystem.h.

Referenced by publish().

◆ Result

llvm::ErrorOr<const CachedFileSystemEntry *> clang::dependencies::DependencyScanningFilesystemSharedCache::InProgressEntry::Result = std::error_code{}

Definition at line 168 of file DependencyScanningFilesystem.h.

Referenced by publish().


The documentation for this struct was generated from the following file: