withLeases
abstract suspend fun <T> withLeases(requester: HasAnalysisResult, projectPath: ProjectPath, sourceSetName: SourceSetName, action: suspend (Collection<HasAnalysisResult>) -> T): T(source)
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.