making payload concurrency dynamic via direct int change

This commit is contained in:
mzack
2024-04-03 23:06:08 +02:00
parent a140a4194e
commit af7450737a
6 changed files with 48 additions and 12 deletions

View File

@@ -143,6 +143,16 @@ func (h *StopAtFirstMatchHandler[T]) Release() {
}
}
func (h *StopAtFirstMatchHandler[T]) Resize(size int) {
if h.sgPool.Size != size {
h.sgPool.Resize(size)
}
}
func (h *StopAtFirstMatchHandler[T]) Size() int {
return h.sgPool.Size
}
// Wait waits for all work to be done
func (h *StopAtFirstMatchHandler[T]) Wait() {
switch h.poolType {