MCPcopy
hub / github.com/yusing/godoxy / waitForReady

Method waitForReady

internal/idlewatcher/state.go:69–82  ·  view source on GitHub ↗

waitForReady waits for the container to become ready or context to be canceled. Returns true if ready, false if canceled.

(ctx context.Context)

Source from the content-addressed store, hash-verified

67// waitForReady waits for the container to become ready or context to be canceled.
68// Returns true if ready, false if canceled.
69func (w *Watcher) waitForReady(ctx context.Context) bool {
70 // Check if already ready
71 if w.ready() {
72 return true
73 }
74
75 // Wait for ready notification or context cancellation
76 select {
77 case <-w.readyNotifyCh:
78 return true
79 case <-ctx.Done():
80 return false
81 }
82}
83
84func (w *Watcher) waitStarted(reqCtx context.Context) bool {
85 select {

Callers 2

wakeFromStreamMethod · 0.95
wakeFromHTTPMethod · 0.95

Calls 1

readyMethod · 0.95

Tested by

no test coverage detected