MCPcopy Create free account
hub / github.com/github/copilot-sdk / SetProcessDone

Method SetProcessDone

go/internal/jsonrpc2/jsonrpc2.go:101–106  ·  view source on GitHub ↗

SetProcessDone sets a channel that will be closed when the process exits, and stores the error pointer that should be returned to pending/future requests. The error is read directly from the pointer after the channel closes, avoiding a race between an async goroutine and callers checking the error.

(done chan struct{}, errPtr *error)

Source from the content-addressed store, hash-verified

99// The error is read directly from the pointer after the channel closes, avoiding
100// a race between an async goroutine and callers checking the error.
101func (c *Client) SetProcessDone(done chan struct{}, errPtr *error) {
102 c.processDone = done
103 c.processErrorMu.Lock()
104 c.processErrorPtr = errPtr
105 c.processErrorMu.Unlock()
106}
107
108// getProcessError returns the process exit error if the process has exited.
109// It reads directly from the stored error pointer, which is guaranteed to be

Calls

no outgoing calls