Closed adammurdoch closed 5 years ago
There's a fix in https://github.com/gradle/gradle/pull/7476.
I want to do a clean up PR before we consider this finished.
Some clean up in https://github.com/gradle/gradle/pull/7493.
I'd like to do a few more tidy-ups before closing this.
Some more clean up in https://github.com/gradle/gradle/pull/7552. This will do for now, I think.
Dependency resolution locks the target project of a project dependency in order to calculate project metadata, or to resolve the artifacts and files of a configuration, if not already done. However, when this happens at task execution time, a long running task in the target project will block the worker thread.
We should take advantage of the fact that a task has declared that it will (indirectly) need these pieces of metadata in order to execute to prepare the metadata in some way before starting the task.
We should also verify that locking does in fact happen only when the particular value is not already available.