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

Method initServerWorkers

server.go:692–700  ·  view source on GitHub ↗

initServerWorkers creates worker goroutines and a channel to process incoming connections to reduce the time spent overall on runtime.morestack.

()

Source from the content-addressed store, hash-verified

690// initServerWorkers creates worker goroutines and a channel to process incoming
691// connections to reduce the time spent overall on runtime.morestack.
692func (s *Server) initServerWorkers() {
693 s.serverWorkerChannel = make(chan func())
694 s.serverWorkerChannelClose = sync.OnceFunc(func() {
695 close(s.serverWorkerChannel)
696 })
697 for i := uint32(0); i < s.opts.numServerWorkers; i++ {
698 go s.serverWorker()
699 }
700}
701
702// NewServer creates a gRPC server which has no service registered and has not
703// started to accept requests yet.

Callers 1

NewServerFunction · 0.95

Calls 1

serverWorkerMethod · 0.95

Tested by

no test coverage detected