use of org.gradle.internal.operations.BuildOperationWorkerRegistry.Completion in project gradle by gradle.
the class WorkerDaemonClient method execute.
@Override
public <T extends WorkSpec> DefaultWorkResult execute(final WorkerAction<T> action, final T spec, Operation parentWorkerOperation, BuildOperationExecutor.Operation parentBuildOperation) {
Completion workerLease = parentWorkerOperation.operationStart();
BuildOperationDetails buildOperation = BuildOperationDetails.displayName(action.getDisplayName()).parent(parentBuildOperation).build();
try {
return buildOperationExecutor.run(buildOperation, new Transformer<DefaultWorkResult, BuildOperationContext>() {
@Override
public DefaultWorkResult transform(BuildOperationContext buildOperationContext) {
uses++;
return workerDaemonProcess.execute(action, spec);
}
});
} finally {
workerLease.operationFinish();
}
}
Aggregations