ShouldUpdate returns true if the queue size or worker count (alive or total) has changed
(size, workerCount int)
| 129 | |
| 130 | // ShouldUpdate returns true if the queue size or worker count (alive or total) has changed |
| 131 | func (m *Queue[T]) ShouldUpdate(size, workerCount int) bool { |
| 132 | return m.size != size || m.workerCount != workerCount |
| 133 | } |
| 134 | |
| 135 | func (m *Queue[T]) Shutdown(ctx context.Context) error { |
| 136 | // Call to stopWorkers only once |