{"id":38836663,"url":"https://github.com/rocketbitz/pool","last_synced_at":"2026-01-17T13:56:32.924Z","repository":{"id":57560795,"uuid":"188512234","full_name":"rocketbitz/pool","owner":"rocketbitz","description":"a simple worker pool for gophers","archived":false,"fork":false,"pushed_at":"2025-08-21T03:01:16.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-21T04:42:23.420Z","etag":null,"topics":["concurrency","concurrent-programming","go","golang","gopher","goroutine","multithreading","performance","pool","pooling","simple","threading","worker","worker-pool","workers"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rocketbitz.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}},"created_at":"2019-05-25T02:40:07.000Z","updated_at":"2025-08-21T03:00:23.000Z","dependencies_parsed_at":"2022-09-01T11:51:19.977Z","dependency_job_id":null,"html_url":"https://github.com/rocketbitz/pool","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/rocketbitz/pool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rocketbitz%2Fpool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rocketbitz%2Fpool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rocketbitz%2Fpool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rocketbitz%2Fpool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rocketbitz","download_url":"https://codeload.github.com/rocketbitz/pool/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rocketbitz%2Fpool/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28509604,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T13:38:16.342Z","status":"ssl_error","status_checked_at":"2026-01-17T13:37:44.060Z","response_time":85,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["concurrency","concurrent-programming","go","golang","gopher","goroutine","multithreading","performance","pool","pooling","simple","threading","worker","worker-pool","workers"],"created_at":"2026-01-17T13:56:32.845Z","updated_at":"2026-01-17T13:56:32.913Z","avatar_url":"https://github.com/rocketbitz.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pool [![CircleCI](https://circleci.com/gh/rocketbitz/pool/tree/master.svg?style=svg)](https://circleci.com/gh/rocketbitz/pool/tree/master)\na simple worker pool for gophers\n\n# installation\n\nas with all other go packages, you know what to do:\n```\ngo get github.com/rocketbitz/pool\n```\n\n# usage\n\nthis worker pool package was designed to be straightforward, specifically because I found others to be unnecessarily complex. here's an example:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/rocketbitz/pool\"\n)\n\nfunc main() {\n\tnumWorkers := 10\n\tjobToRun := func(input interface{}) {\n\t\tfmt.Println(\"let's do a job on this input: \", input)\n\t}\n\n\tjobStartCallback := pool.Callback{\n\t\tEvent: pool.JobStart,\n\t\tFunc: func() {\n\t\t\tfmt.Println(\"we're starting a job...\")\n\t\t},\n\t}\n\n\tjobEndCallback := pool.Callback{\n\t\tEvent: pool.JobEnd,\n\t\tFunc: func() {\n\t\t\tfmt.Println(\"we've finished a job.\")\n\t\t},\n\t}\n\n\tp := pool.New(\n\t\tnumWorkers,\n\t\tjobToRun,\n\t\tjobStartCallback,\n\t\tjobEndCallback,\n\t)\n\n\tc := make(chan interface{})\n\n\tgo p.Work(c)\n\n\tfor i := 0; i \u003c 100; i++ {\n\t\tc \u003c- \"hello, gophers\"\n\t}\n\n\tclose(c)\n\tp.Wait()\n}\n```\nhopefully that example makes sense to you. note that the callback argument to `New()` is variadic, so register as many callbacks as your heart desires. oh, one more thing, if you forget a callback when you declare the pool, you can always register one later like so:\n```go\np.RegisterCallback(\n  Callback{\n    Event: JobEnd,\n    Func: func() { fmt.Println(\"i'm a forgetful gopher\") },\n  },\n)\n```\n\n# contribute\n\npr's are welcome. if they're awesome, they'll get reviewed and merged. if they're not, they'll get reviewed and closed, hopefully with a kind comment as to the reason.\n\n# license\n\n[MIT](https://github.com/rocketbitz/pool/blob/master/LICENSE) ...move along, move along.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frocketbitz%2Fpool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frocketbitz%2Fpool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frocketbitz%2Fpool/lists"}