pond
pond copied to clipboard
🔘 Minimalistic and High-performance goroutine worker pool written in Go
I was initially using panics to handle errors because it seemed like the `FailedTasks` supports using panics. It seems a little weird to see a panic every time an error...
I'm a bit confused how I can make it so that I create 1 pool where I make submissions to 3 different tasks, but still have the same number of...
Can pond add a feature to support task priority? Tasks with higher priority are processed first.
test demo : package main import ( "fmt" "github.com/alitto/pond" "time" ) func testPool(i int, p *pond.WorkerPool) { if i == 8 { var stop string // fmt.Printf("stop -- %d :...
//test demo func TestTaskGroup(t *testing.T) { // Create a pool pool := pond.New(10, 1000) defer pool.StopAndWait() go func() { for { println(fmt.Sprintf("mertics: running=%v, ide=%v, waiting=%v", pool.RunningWorkers(), pool.IdleWorkers(), pool.WaitingTasks())) time.Sleep(1 *...
I ran into an issue where a nested group just started to hang, but it seems to really depend on the amount of workers and tasks. My expectation was that...
## Background I have a system where I will be using pond for network related download tasks. To avoid hitting rate limiters when issuing multiple network requests it would be...
As a possible resolution of the problem presented in #59 I added option limit number of tasks in group. Unfortunatelly, i had to add `golang.org/x/sync v0.7.0` library, so now there...
Currently, when calling pool.Stop(), there's no immediate way to know when the pool has completely halted its operations. By adding a chan struct{} return type to pool.Stop(), users can receive...
## Problem I am running an application that consistently operates with a specific number of workers. Additionally, when a worker discovers work, it requires a boost from the pool. To...