I was tired of having to write the same basic primitive over and over again: A channel, some control logic, etc.
So I wrote toil -- A port of two of my favorite Python functions over into the Go world. It's very simple. There's optimizations to be made for sure, but this is the result of a couple of hours of wanting something that felt Go-Like in the right way.
Looks pretty cool I've wanted something similar many times
Quick question, why this style?
opts := toil.Options{}. WithWorkers(4). // Use 4 workers (default: number of CPU cores) StopOnError(true)
Most golang uses: toil.Options{Workers: 4} etc etc?
Bar that I look forward to using it!
Another thing maybe
Using context here would be great so jobs can be cancelled instead of timeout