From f37dd25d31b1549ed6e70b0a65461ea7621f36f3 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sun, 3 May 2026 05:15:43 +0000 Subject: [PATCH] Run TaskGroup scanners in parallel by marking them nonisolated Co-authored-by: acebytes <2820910+acebytes@users.noreply.github.com> --- Sources/Cacheout/Scanner/CacheScanner.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/Cacheout/Scanner/CacheScanner.swift b/Sources/Cacheout/Scanner/CacheScanner.swift index 3ce3e9c..6d99842 100644 --- a/Sources/Cacheout/Scanner/CacheScanner.swift +++ b/Sources/Cacheout/Scanner/CacheScanner.swift @@ -42,7 +42,7 @@ actor CacheScanner { } } - func scanCategory(_ category: CacheCategory) async -> ScanResult { + nonisolated func scanCategory(_ category: CacheCategory) async -> ScanResult { let resolvedPaths = category.resolvedPaths guard !resolvedPaths.isEmpty else { return ScanResult(category: category, sizeBytes: 0, itemCount: 0, exists: false) @@ -65,7 +65,7 @@ actor CacheScanner { ) } - private func directorySize(at url: URL) -> (Int64, Int) { + nonisolated private func directorySize(at url: URL) -> (Int64, Int) { var totalSize: Int64 = 0 var itemCount = 0