You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed container-compose up is using 100% CPU (on a single core) after starting all the containers from docker-compose.yml. There's likely an issue with polling logs/state. A workaround is to exit the command after starting, the containers will keep running.
Confirmed on main. Reproduces with any compose file run without -d — single container running sleep 60, the container-compose process holds 100% on one core.
The hot loop is ComposeUp.swift::waitForever:
forawait _ inAsyncStream<Void>(unfolding:{}){
// This will never run
}
AsyncStream<Void>(unfolding: () async -> Void?) ends only when the closure returns nil. The empty closure returns (), which Swift auto-wraps as .some(()) — never nil — so the stream emits infinitely with no await between iterations. The body runs constantly; the // This will never run comment is inverted.
PR #82 swaps the busy loop for withUnsafeContinuation { _ in }. Same repro after the fix shows 0.0 container-compose.
Activity
Cyb3rDudu commentedon May 4, 2026
Confirmed on
main. Reproduces with any compose file run without-d— single container runningsleep 60, thecontainer-composeprocess holds 100% on one core.The hot loop is
ComposeUp.swift::waitForever:AsyncStream<Void>(unfolding: () async -> Void?)ends only when the closure returnsnil. The empty closure returns(), which Swift auto-wraps as.some(())— nevernil— so the stream emits infinitely with noawaitbetween iterations. The body runs constantly; the// This will never runcomment is inverted.PR #82 swaps the busy loop for
withUnsafeContinuation { _ in }. Same repro after the fix shows0.0 container-compose.test(up): regression test for foreground CPU busy-loop (Mcrich23#27)
fix(tests): widen waitForever CPU test window to eliminate parallel-s…
fix(tests): widen waitForever CPU test window to eliminate parallel-s…
fix(tests): widen waitForever CPU test window to eliminate parallel-s…
Fix Up Command Foreground Interactions when sending signals (#127)