triggerRedispatch queues a redispatch signal unless one is already pending. If the child is shutting down, the signal is ignored.
()
| 501 | // triggerRedispatch queues a redispatch signal unless one is already pending. |
| 502 | // If the child is shutting down, the signal is ignored. |
| 503 | func (child *partitionConsumer) triggerRedispatch() { |
| 504 | select { |
| 505 | case <-child.dispatcherStop: |
| 506 | return |
| 507 | case <-child.dying: |
| 508 | return |
| 509 | default: |
| 510 | } |
| 511 | |
| 512 | select { |
| 513 | case child.trigger <- none{}: |
| 514 | default: |
| 515 | } |
| 516 | } |
| 517 | |
| 518 | func (child *partitionConsumer) stopDispatcher() { |
| 519 | child.dispatcherStopOnce.Do(func() { |
no outgoing calls