{"id":17837000,"url":"https://github.com/peakle/bees","last_synced_at":"2025-04-02T13:21:25.152Z","repository":{"id":144709090,"uuid":"606301884","full_name":"peakle/bees","owner":"peakle","description":"Memory lightweight goroutines pool","archived":false,"fork":false,"pushed_at":"2023-10-10T06:48:36.000Z","size":25,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-08T04:26:55.706Z","etag":null,"topics":["go","golang","goroutine-pool","pool"],"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/peakle.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2023-02-25T04:35:18.000Z","updated_at":"2024-11-17T21:39:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"7707f09e-f0b0-4538-a4fa-a78a4e4fa3f5","html_url":"https://github.com/peakle/bees","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peakle%2Fbees","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peakle%2Fbees/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peakle%2Fbees/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peakle%2Fbees/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peakle","download_url":"https://codeload.github.com/peakle/bees/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246819785,"owners_count":20839096,"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","goroutine-pool","pool"],"created_at":"2024-10-27T20:44:58.440Z","updated_at":"2025-04-02T13:21:25.125Z","avatar_url":"https://github.com/peakle.png","language":"Go","readme":"# Bees\n\n[![Tests](https://github.com/peakle/bees/workflows/Tests/badge.svg)](https://github.com/peakle/bees/blob/master/.github/workflows/ci.yml)\n[![codecov](https://codecov.io/gh/peakle/bees/branch/master/graph/badge.svg)](https://codecov.io/gh/peakle/bees)\n[![Go Report Card](https://goreportcard.com/badge/github.com/peakle/bees)](https://goreportcard.com/report/github.com/peakle/bees)\n[![Go Reference](https://pkg.go.dev/badge/github.com/peakle/bees.svg)](https://pkg.go.dev/github.com/peakle/bees)\n\nBees - simple and lightweight worker pool for go.\n\n## Benchmarks:\n\n### [10m tasks and 500k workers](https://github.com/peakle/bees/blob/master/pool_bench_test.go):\n\n#### WorkerPool:\n\n\u003cimg width=\"900\" alt=\"WorkerPoolBench\" src=\"https://user-images.githubusercontent.com/27820873/133930212-806c5918-4b30-4950-8139-326317ce3a56.png\"\u003e\n\n\u003cb\u003eonly 37MB used for 500k workers pool\u003c/b\u003e\n\n#### Goroutines:\n\n\u003cimg width=\"900\" alt=\"GoroutinesBench\" src=\"https://user-images.githubusercontent.com/27820873/133930166-d34b6dcf-b9f0-4275-93ec-08ecdb988e1f.png\"\u003e\n\n#### Semaphore:\n\n\u003cimg width=\"900\" alt=\"SemaphoreBench\" src=\"https://user-images.githubusercontent.com/27820873/133930179-25495409-65cb-447a-ab06-72698412c646.png\"\u003e\n\n## Examples:\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/peakle/bees\"\n)\n\n// Example - demonstrate pool usage\nfunc Example() {\n\tpool := bees.Create(context.Background())\n\tdefer pool.Close()\n\n\tt := 1\n\ttask := func(ctx context.Context) {\n\t\tt++\n\t\tfmt.Println(t)\n\t}\n\tpool.Submit(task)\n\tpool.Submit(task)\n\tpool.Submit(task)\n\n\tpool.Wait()\n\t// Output:\n\t// 1\n\t// 2\n\t// 3\n}\n\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeakle%2Fbees","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeakle%2Fbees","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeakle%2Fbees/lists"}