Description
APMServerManager.checkRunning() called launchctl/kill via Process.waitUntilExit() directly on @mainactor, blocking the macOS menubar UI thread during every health check cycle.
Fix
Dispatch to Task.detached(priority: .utility) so shell work runs on a background thread. Result is then promoted back to main actor via await.
Files:
- CCEMAgent/Sources/CCEMAgent/Services/APMServerManager.swift (async dispatch)
- CCEMAgent/Sources/CCEMAgent/CCEMAgentApp.swift (await callers)
Fixed in
PR #3 — fix/ccem-agent-memory-leak