Prioritize worker pool shutdown
@@ -206,6 +206,12 @@ func (f *FIFOScheduler[T]) processTask(
return
}
+ select {
+ case <-shutdownCh:
+ return
+ default:
+ }
+
select {
case task := <-f.tasksChan:
f.executeTask(task)
