]> source.dussan.org Git - gitea.git/commit
Only attempt to flush queue if the underlying worker pool is not finished (#18593)
authorzeripath <art27@cantab.net>
Sat, 5 Feb 2022 20:51:25 +0000 (20:51 +0000)
committerGitHub <noreply@github.com>
Sat, 5 Feb 2022 20:51:25 +0000 (20:51 +0000)
commit7ba1b7112f47a2025e8538509a24d8c6d5b1f488
tree4003c0c3040a11baf4dcd96f9861c0e70e0300b6
parenta51d2114c7c0472cf20459dd8916bf48d529ae83
Only attempt to flush queue if the underlying worker pool is not finished (#18593)

* Only attempt to flush queue if the underlying worker pool is not finished

There is a possible race whereby a worker pool could be cancelled but yet the
underlying queue is not empty. This will lead to flush-all cycling because it
cannot empty the pool.

Signed-off-by: Andrew Thornton <art27@cantab.net>
* Apply suggestions from code review

Co-authored-by: Gusted <williamzijl7@hotmail.com>
Co-authored-by: Gusted <williamzijl7@hotmail.com>
modules/queue/manager.go
modules/queue/workerpool.go