@@ -57,7 +57,6 @@ trait GroupExecution {
5757 def env : Map [String , String ]
5858 def failFast : Boolean
5959 def ec : Option [ThreadPoolExecutor ]
60- def isFinalDepth : Boolean
6160 def codeSignatures : Map [String , Int ]
6261 def systemExit : ( /* reason */ String , /* exitCode */ Int ) => Nothing
6362 def exclusiveSystemStreams : SystemStreams
@@ -287,12 +286,6 @@ trait GroupExecution {
287286 kind
288287 )
289288
290- def withTaskWriteLock [T ](t : LauncherLocking .Lease => T ): T = {
291- val lease = acquireTaskLock(LauncherLocking .LockKind .Write )
292- try t(lease)
293- finally lease.close()
294- }
295-
296289 // Helper to evaluate the task with full caching support
297290 def evaluateTaskWithCaching (): GroupExecution .Results = {
298291 case class CacheProbe (
@@ -438,7 +431,8 @@ trait GroupExecution {
438431 // Helper to evaluate build override only (no task evaluation)
439432 def evaluateBuildOverrideOnly (located : Located [Appendable [BufferedValue ]])
440433 : GroupExecution .Results = {
441- withTaskWriteLock { _ =>
434+ val lease = acquireTaskLock(LauncherLocking .LockKind .Write )
435+ try {
442436 val (execRes, serializedPaths) =
443437 if (os.Path (labelled.ctx.fileName).endsWith(" mill-build/build.mill" )) {
444438 val msg =
@@ -465,7 +459,7 @@ trait GroupExecution {
465459 }
466460 }
467461 cachedResult(execRes, serializedPaths)
468- }
462+ } finally lease.close()
469463 }
470464
471465 // Three-way conditional:
0 commit comments