signalWake wakes the run loop so it calls processOnce immediately. Non-blocking: if a signal is already pending it is a no-op.
()
| 4386 | // signalWake wakes the run loop so it calls processOnce immediately. |
| 4387 | // Non-blocking: if a signal is already pending it is a no-op. |
| 4388 | func (p *Server) signalWake() { |
| 4389 | select { |
| 4390 | case p.wakeCh <- struct{}{}: |
| 4391 | default: |
| 4392 | } |
| 4393 | } |
| 4394 | |
| 4395 | func (p *Server) processOnce(ctx context.Context) { |
| 4396 | if ctx.Err() != nil { |
no outgoing calls
no test coverage detected