{"id":36484962,"url":"https://github.com/radutanasa/gothpool","last_synced_at":"2026-01-12T01:46:54.326Z","repository":{"id":57550507,"uuid":"255251788","full_name":"radutanasa/gothpool","owner":"radutanasa","description":"A simple fire-and-forget golang executor pool.","archived":false,"fork":false,"pushed_at":"2020-10-30T07:08:46.000Z","size":5,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-06-20T13:33:04.296Z","etag":null,"topics":["executor","golang-library","goroutine-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/radutanasa.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":"2020-04-13T06:44:01.000Z","updated_at":"2021-11-23T22:02:58.000Z","dependencies_parsed_at":"2022-08-29T22:30:56.774Z","dependency_job_id":null,"html_url":"https://github.com/radutanasa/gothpool","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/radutanasa/gothpool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radutanasa%2Fgothpool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radutanasa%2Fgothpool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radutanasa%2Fgothpool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radutanasa%2Fgothpool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/radutanasa","download_url":"https://codeload.github.com/radutanasa/gothpool/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radutanasa%2Fgothpool/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28331253,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T00:36:25.062Z","status":"ssl_error","status_checked_at":"2026-01-12T00:36:15.229Z","response_time":60,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["executor","golang-library","goroutine-pool"],"created_at":"2026-01-12T01:46:53.741Z","updated_at":"2026-01-12T01:46:54.321Z","avatar_url":"https://github.com/radutanasa.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gothpool\n \nGothpool is a Golang library for running fire-and-forget jobs using a fixed size goroutine pool and processing queue. \n\n## Install\n\n``` sh\ngo get github.com/radutanasa/gothpool\n```\n\nOr, using dep:\n\n``` sh\ndep ensure -add github.com/radutanasa/gothpool\n```\n\n## Use\n\nSimply instantiate the gothpool (executor pool) with your desired level of parallelism and queue size \nand start sending it functions.\n\n``` go\npackage main\n\nimport (\n    \"github.com/radutanasa/gothpool\"\n)\n\nfunc main() {\t\n    exec := gothpool.New(4, 1e5)\n    exec.Start()\n    defer exec.Stop()\n\n    exec.Run(func() {\n        // perform operations\n    })\t\n}\n```\n\nIt's important to note that the executor pool will finish its current job queue, but won't receive any new jobs. \n\nA `Run()` call on a stopped pool will return an `ExecPoolStoppedErr` error.\n\nThe pool can be restarted by calling the `Start()` function.\n\n**IMPORTANT:** Variables sent to the executor should not change!\n\nThis code results in an unexpected behavior, as `i` references different values:\n``` go\nfor i:=0; i\u003c10; i++ {\n    exec.Run(func() {\n        println(i)\n    })\n} \n```\nThis results in the correct behavior:\n``` go\nfor i:=0; i\u003c10; i++ {\n    var j = i\n    exec.Run(func() {\n        println(j)\n    })\n} \n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fradutanasa%2Fgothpool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fradutanasa%2Fgothpool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fradutanasa%2Fgothpool/lists"}