{"id":17156511,"url":"https://github.com/savsgio/workerpool","last_synced_at":"2025-08-02T21:17:23.035Z","repository":{"id":57704606,"uuid":"497946660","full_name":"savsgio/workerpool","owner":"savsgio","description":"Lightweight and fast worker pool with generics support.","archived":false,"fork":false,"pushed_at":"2025-04-08T10:40:36.000Z","size":21,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-08T11:33:36.035Z","etag":null,"topics":["go","golang","tool","utils","worker-pool"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/savsgio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-30T13:05:10.000Z","updated_at":"2025-04-08T10:40:40.000Z","dependencies_parsed_at":"2024-03-03T18:25:24.553Z","dependency_job_id":"42b27272-d67a-4ea4-ab60-1ddd1f226728","html_url":"https://github.com/savsgio/workerpool","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/savsgio%2Fworkerpool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/savsgio%2Fworkerpool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/savsgio%2Fworkerpool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/savsgio%2Fworkerpool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/savsgio","download_url":"https://codeload.github.com/savsgio/workerpool/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248718067,"owners_count":21150499,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","golang","tool","utils","worker-pool"],"created_at":"2024-10-14T22:06:39.447Z","updated_at":"2025-04-13T13:20:49.532Z","avatar_url":"https://github.com/savsgio.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# workerpool\n\n[![Test status](https://github.com/savsgio/workerpool/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/savsgio/workerpool/actions?workflow=test)\n[![Go Report Card](https://goreportcard.com/badge/github.com/savsgio/workerpool)](https://goreportcard.com/report/github.com/savsgio/workerpool)\n[![GoDev](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go\u0026logoColor=white)](https://pkg.go.dev/github.com/savsgio/workerpool)\n\nLightweight and fast worker pool with generics support.\n\nGo version: \u003e=1.18\n\nBased on: [valyala/fasthttp/workerpool.go](https://github.com/valyala/fasthttp)\n\n## Example:\n\n```go\ntype Foo struct {\n    A int\n    B int\n}\n\nwg := sync.WaitGroup{}\n\nhandler := func(args Foo) {\n    log.Println(args.A + args.B)\n    wg.Done()\n}\n\nwp := New(\n    Config{\n        MaxWorkersCount:       100,\n        MaxIdleWorkerDuration: 5 * time.Second,\n    },\n    handler,\n)\n\nfor i := 0; i \u003c 10; i++ {\n    wg.Add(1)\n    wp.Exec(Foo{A: i, B: i + 1})\n}\n\nwg.Wait()\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsavsgio%2Fworkerpool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsavsgio%2Fworkerpool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsavsgio%2Fworkerpool/lists"}