Skip to content

CCEMAgent UI stall: checkRunning() blocks main actor with synchronous shell call #6

@peguesj

Description

@peguesj

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions