SafeAnalysisResultAccess

Thread-safe, "leased" access to AnalysisResult creation and subsequent ModuleDescriptorImpl access.

Inheritors

Functions

Link copied to clipboard
abstract suspend fun <T> withLeases(requester: HasAnalysisResult, projectPath: ProjectPath, sourceSetName: SourceSetName, action: suspend (Collection<HasAnalysisResult>) -> T): T

Suspends until all dependency module descriptors are available for use, then acquires locks for all of them and performs action. No other project/source set will be able to read from those analysis results, binding contexts, or module descriptors until action has completed.