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

Method updatePicker

picker_wrapper.go:63–69  ·  view source on GitHub ↗

updatePicker is called by UpdateState calls from the LB policy. It unblocks all blocked pick.

(p balancer.Picker)

Source from the content-addressed store, hash-verified

61// updatePicker is called by UpdateState calls from the LB policy. It
62// unblocks all blocked pick.
63func (pw *pickerWrapper) updatePicker(p balancer.Picker) {
64 old := pw.pickerGen.Swap(&pickerGeneration{
65 picker: p,
66 blockingCh: make(chan struct{}),
67 })
68 close(old.blockingCh)
69}
70
71// doneChannelzWrapper performs the following:
72// - increments the calls started channelz counter

Calls 1

SwapMethod · 0.45