workgroup
golang-generics-dao-example
Our great sponsors
workgroup | golang-generics-dao-example | |
---|---|---|
7 | 2 | |
47 | 13 | |
- | - | |
0.0 | 3.2 | |
10 months ago | about 2 years ago | |
Go | Go | |
MIT License | - |
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.
workgroup
-
Gworker, the most easily configurable Generic worker pool implementation
I still think my worker pool is the best: https://github.com/carlmjohnson/workgroup
- A lot of boilerplate code when writing asynchronous code in go
- Workgroup: An easy to use concurrent task manager
-
Implementing Thread/Worker pool using Go generics
I have one that I’ve been using for a while and just updated to use Go 1.20 multierrors: https://github.com/carlmjohnson/workgroup
-
How idiomatic is this?
Read https://blog.carlmjohnson.net/post/share-memory-by-communicating/ and look at the code in https://github.com/carlmjohnson/workgroup for reference.
-
How are YOU using generics so far?
So far, just refactoring. I made a concurrency manager to simplify some stuff, and unified some pagination code. It’s like we said before generics: there are places you miss it, but not having it was never a total blocker. I think going working the x/slices x/maps packages will be the biggest time savers.
-
Go, Generics, and Concurrency
Yeah, I wrote my own generic concurrency thing, and it has two functions. There's a high level Process(nWorkers, task, manager, initial) and a lower level Start(nWorkers, task) (in chan<- Input, out <-chan Result[Input, Output]). The high level function is built off of the low level one and just queues jobs for the task workers by giving job results to the manager to see if it produces any more work. Context isn't involved in either because the idea is that the tasks should have their own internal contexts. You don't want to cancel the task runner, you want to cancel the tasks!
golang-generics-dao-example
- How are YOU using generics so far?
-
Now that Golang has generic types, how do you plan to use them?
My example: https://github.com/num8er/golang-generics-dao-example
What are some alternatives?
warg - Declarative and Intuitive Command Line Apps with Go
go-zero - A cloud-native Go microservices framework with cli tool for productivity.
next-pwa - Zero config PWA plugin for Next.js, with workbox 🧰 with appDir support
wire - Compile-time Dependency Injection for Go
watchman - AML/CTF/KYC/OFAC Search of global watchlist and sanctions
stream - Stream API for Go.
golpo - Social network using react and express (old version of the current golpo.dedsec.life)
aws-sdk-go - AWS SDK for the Go programming language.
elegalio-template - Responsive and modern website template, made with React.
mapreduce - A in-process MapReduce library to help you optimizing service response time or concurrent task processing.
BetterMeet - An open community platform