Skip to content

armgit / peel

Public Imported from GitHub
0

Uninstall Mac apps with every file they leave behind, and see why each belongs. Free up space, fine-tune macOS, and set up Terminal.

Don't let a test of a stopped read wait for a stop it asked too early

Țugui Dragoș566a770b335d
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/DuplicateFinderTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/DuplicateFinderTests.swift
index b87e5b33..62433411 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/DuplicateFinderTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/DuplicateFinderTests.swift
@@ -46,8 +46,10 @@ struct DuplicateFinderTests {
defer { end.finish() }
return FileDigest.full(of: url, identity: identity, isGivenUp: isGivenUp) { count in
bytesRead.withLock { $0 += count }
- stop.withLock { $0 }?()
- while !isGivenUp() { usleep(100) }
+ while !isGivenUp() {
+ stop.withLock { $0 }?()
+ usleep(100)
+ }
}
}
}