goneric
ants
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
goneric
-
(Rust) Tokio, FuturesUnordered, and the Thundering Herd Problem
Only thing missing from making it look and work as traditional async is lack of pre-processor to make it "look nice". Generics do make it a bit better, for example from my lib you can introduce some concurrency quite easily, for example
-
Conc: Better Structured Concurrency for Go
I do like idea of waitgroup on steroids, I might steal it for my generic library.
* [1] https://github.com/XANi/goneric/blob/master/worker.go#L92
-
Have yet to use generics...Am I missing out?
Shameless plug: here is a list of some useful stuff you can do with it, with code attached.
-
I've created a Go Generics cheatsheet to give you a quick reminder of how to use this feature
If someone wants some more examples I've made a lib with a bunch of common constructs. Fun ones include "run function in parallel on a slice and put it in output slice in order" or "return which elements are different between slices", with version allowing to easily get difference between 2 different types using conversion function
- Spawn multiple go routines, get the results back, in order of goroutine spawn...
ants
-
Rust vs Go Issue
I remember doing something similar to OP recently. Goroutines also incur a bit of overhead (have to be GC'd and so on), and the same worker pool technique can be applied to them in much the same way, as seen in popular libraries like https://github.com/panjf2000/ants
-
Beginner ~ Intermediate Go programmer, how can I get better in go and get out of the "beginner" phase?
The best example I can give you is https://github.com/nutsdb/nutsdb it’s great project that got me started, one thing one should know is Go is different “yep” so there’re some coding habits that may bite you in Go and the Go compiler won’t correct you, you wanna learn about optimizations, unsafe usage check out https://github.com/valyala/fasthttp (note this is deep the rabbit hole), wanna learn concurrency check out ants https://github.com/panjf2000/ants with a little aid from “Go by example” you’re good to go
-
Conc: Better Structured Concurrency for Go
conc seem similar to ant lib (https://github.com/panjf2000/ants). Is there any considerable difference between them?
-
[Side Project] Post automated Youtube videos from Reddit
But still, that looked hard to maintain, and I asked myself there has to be a better way to do this, just out of curiosity i googled and came across ants which seemed exactly right for this kind of functionality I wanted, so I converted the same function to use ants, and it became this:
-
Dynamic number of Goroutines based on load?
You can try use this one https://github.com/panjf2000/ants We are using that as well for that purpose
-
Itogami, the best golang thread-pool till date
Benchmarking was performed against existing golang threadpool implementations Ants and Gamma-Zero-Worker-Pool and unlimited goroutines
-
Hello! Please explain what a pool?
The readme of the project explains it very well: https://github.com/panjf2000/ants
-
Parapipe - FIFO paralleling pipeline with concurrent job processing
Looks interesting, but what new concepts/features does it bring to the table compared to the already battletested ants library? Link: https://github.com/panjf2000/ants
What are some alternatives?
dskDitto - Super fast duplicate file finder written in Golang.
tunny - A goroutine pool for Go
conc - Better structured concurrency for go
goworker - goworker is a Go-based background worker that runs 10 to 100,000* times faster than Ruby-based workers.
go-future - A futures concurrency library in go
pond - 🔘 Minimalistic and High-performance goroutine worker pool written in Go
go-recovery - Golang recover from panics
workerpool - Go simple async worker pool
advent-of-code-2022 - Advent of Code 2022
threadpool - Golang simple thread pool implementation
lo - 💥 A Lodash-style Go library based on Go 1.18+ Generics (map, filter, contains, find...)
go-waitgroup - A sync.WaitGroup with error handling and concurrency control