MCPcopy
hub / github.com/grpc/grpc-go / Wait

Method Wait

internal/testutils/blocking_context_dialer.go:105–113  ·  view source on GitHub ↗

Wait blocks until there is a connection attempt on this Hold, or the context expires. Return false if the context has expired, true otherwise.

(ctx context.Context)

Source from the content-addressed store, hash-verified

103// Wait blocks until there is a connection attempt on this Hold, or the context
104// expires. Return false if the context has expired, true otherwise.
105func (h *Hold) Wait(ctx context.Context) bool {
106 logger.Infof("Hold %p: Waiting for a connection attempt to addr %q", h, h.addr)
107 select {
108 case <-ctx.Done():
109 return false
110 case <-h.waitCh:
111 return true
112 }
113}
114
115// Resume unblocks the dialer for the given addr. Either Resume or Fail must be
116// called at most once on a hold. Otherwise, Resume panics.

Calls 2

InfofMethod · 0.65
DoneMethod · 0.45