Settings

Theme

Show HN: Toil, a go library for simple parallelism

github.com

4 points by indrora 25 days ago · 2 comments · 1 min read

Reader

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.

willx86 20 days ago

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!

  • willx86 20 days ago

    Another thing maybe

    Using context here would be great so jobs can be cancelled instead of timeout

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection