Uninstall Mac apps with every file they leave behind, and see why each belongs. Free up space, fine-tune macOS, and set up Terminal.
Swift cache-cleanercleanerclideveloper-toolsdisk-cleanupdisk-spaceduplicate-finderhomebrewliquid-glassmac-cleanermacosmacos-appmacos-golden-gatemacos-tahoemacos-tweaksswiftswiftuiterminal-themesuninstalluninstaller
End the wait for the helper on time on a busy Mac
Țugui Dragoș4b1e6dd8aa7b
diff --git a/Packages/PeelCore/Sources/PeelCore/Removal/PrivilegedHelper.swift b/Packages/PeelCore/Sources/PeelCore/Removal/PrivilegedHelper.swiftindex 29c08a5b..03754ba4 100644--- a/Packages/PeelCore/Sources/PeelCore/Removal/PrivilegedHelper.swift+++ b/Packages/PeelCore/Sources/PeelCore/Removal/PrivilegedHelper.swift@@ -149,6 +149,9 @@ public enum PrivilegedHelper {/// How long the helper is waited for before the request counts as unanswered.private static let longestWait: TimeInterval = 120+ /// At utility quality these timers would wait behind any utility work queued before them.+ static let timers = DispatchQueue.global(qos: .userInitiated)+@concurrentpublic static func moveToTrash(_ urls: [URL]) async -> TrashResult {var result = TrashResult()@@ -301,7 +304,7 @@ public enum PrivilegedHelper {// A helper that is running but never answers keeps the connection valid, so only this timer ends// the wait. `longestWait` outlasts any request: at most `HelperRequest.maximumItems` renames, or one// `launchctl` run that the helper stops after 30 seconds.- DispatchQueue.global(qos: .utility).asyncAfter(deadline: .now() + longestWait) { finish(fallback) }+ timers.asyncAfter(deadline: .now() + longestWait) { finish(fallback) }guardlet helper = connection.remoteObjectProxyWithErrorHandler({ _ in finish(fallback) })as? any PeelHelperProtocoldiff --git a/Packages/PeelCore/Tests/PeelCoreTests/HelperAnswerTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/HelperAnswerTests.swiftnew file mode 100644index 00000000..6fabb1bb--- /dev/null+++ b/Packages/PeelCore/Tests/PeelCoreTests/HelperAnswerTests.swift@@ -0,0 +1,9 @@+import Foundation+@testable import PeelCore+import Testing++struct HelperAnswerTests {+ @Test func theTimerThatEndsAWaitForTheHelperNeverWaitsBehindWorkOfLowerQuality() {+ #expect(PrivilegedHelper.timers.label == DispatchQueue.global(qos: .userInitiated).label)+ }+}