{"id":27472064,"url":"https://github.com/matthewoestreich/workerpoolxt","last_synced_at":"2026-01-12T01:52:40.384Z","repository":{"id":57547488,"uuid":"301940060","full_name":"matthewoestreich/workerpoolxt","owner":"matthewoestreich","description":"Concurrency limiting goroutine pool without upper limit on queue length. Extends github.com/gammazero/workerpool","archived":false,"fork":false,"pushed_at":"2025-11-19T00:01:17.000Z","size":221,"stargazers_count":15,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-01-12T00:52:08.227Z","etag":null,"topics":["concurrency","multithreading","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/matthewoestreich.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-10-07T05:53:30.000Z","updated_at":"2025-11-18T23:59:06.000Z","dependencies_parsed_at":"2022-09-26T18:40:51.021Z","dependency_job_id":null,"html_url":"https://github.com/matthewoestreich/workerpoolxt","commit_stats":null,"previous_names":["oze4/reactor","oze4/wpreactor","matthewoestreich/workerpoolxt","oze4/workerpoolxt"],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/matthewoestreich/workerpoolxt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewoestreich%2Fworkerpoolxt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewoestreich%2Fworkerpoolxt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewoestreich%2Fworkerpoolxt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewoestreich%2Fworkerpoolxt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matthewoestreich","download_url":"https://codeload.github.com/matthewoestreich/workerpoolxt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewoestreich%2Fworkerpoolxt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28331260,"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":["concurrency","multithreading","worker-pool"],"created_at":"2025-04-16T02:11:20.458Z","updated_at":"2026-01-12T01:52:40.362Z","avatar_url":"https://github.com/matthewoestreich.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eworkerpoolxt\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\n  Worker pool library that extends \u003ca href=\"https://github.com/gammazero/workerpool\"\u003ehttps://github.com/gammazero/workerpool\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\u003ccode\u003ego get github.com/matthewoestreich/workerpoolxt\u003c/code\u003e\u003c/p\u003e\n\u003cp align=\"center\"\u003e\u003ca href=\"https://pkg.go.dev/github.com/matthewoestreich/workerpoolxt\" target=\"_blank\" rel=\"noopener noreferrer\"\u003epkg.go.dev\u003c/a\u003e\u003c/p\u003e\n\n---\n\n## Synopsis\n\nWe wrap the func(s) that get passed to `workerpool`, which we call \"jobs\". Job results will be returned to you after all jobs have completed.\n\nYou have the ability to give each job a name. You can access job results, job runtime duration, or any job errors within job results. In `gammazero/workerpool` this is not possible - you do not have the ability to get any sort of result or error data from a \"job\".\n\n## Important\n\n**Breaking changes in `v1.5.0`!\n\nYou still retain access to all `gammazero/workerpool` members, but **you must use `pool.StopWaitXT()` if you submit jobs via `pool.SubmitXT(..)`!**\n\n## Generics\n\nIf you want to use this package with type-safe generics, [please see here](/generic).\n\n## Import\n\n```go\nimport wpxt \"github.com/matthewoestreich/workerpoolxt\"\n```\n\n## Examples\n\n### Hello, world!\n\n[Playground](https://go.dev/play/p/4oKDsprC8dC)\n\n```go\nnumWorkers := 5\npool := wpxt.New(numWorkers)\n\n// Or if you have an existing |*workerpool.WorkerPool| instance\npool := wpxt.WithWorkerPool(existingWorkerPool)\n\nhelloWorldJob := \u0026wpxt.Job{\n  Name: \"Hello world job\",\n  // Function signature must be |func() (any, error)|\n  Function: func() (any, error) {\n    pretendError := nil\n    if pretendError != nil {\n      // To demonstrate how you would return an error\n      return nil, theError\n    }\n    return \"Hello, world!\", nil\n  },\n}\n\n// Submit job\npool.SubmitXT(helloWorldJob)\n\n// Block main thread until all jobs are done.\nresults := pool.StopWaitXT()\n\n// Results also accessable via\nsameResults := pool.Results()\n\n// Grab first result\nr := results[0]\n\n// Print it to console\nfmt.Printf(\n  \"Name: %s\\nData: %v\\nDuration: %v\\nError?: %v\", \n  r.Name, r.Data, r.Duration, r.Error,\n)\n/*\nName: Hello world job\nData: Hello, world!\nDuration: 3.139µs\nError?: \u003cnil\u003e\n*/\n```\n\n### Using Context\n\nWorks with timeouts, cancelled context, etc..\n\nThe point is: you have full control over every job.\n\n```go\n\u0026wpxt.Job{\n  Name: \"Job using context\",\n  Function: func() (any, error) {\n    timeout := 10 * time.Second\n    ctx, cancel := context.WithTimeout(context.Background(), timeout)\n    defer cancel()\n    result, err := LongRunningTaskWithContext(ctx)\n    if err != nil {\n    \treturn nil, err\n    }\n    return result, nil\n  },\n}\n```\n\n### Using Retry\n\nYou can use something like [backoff](https://github.com/cenkalti/backoff) for this (just an example).\n\nThe point is: you have full control over every job.\n\n```go\n\u0026wpxt.Job{\n  Name: \"Job using retry\",\n  Function: func() (any, error) {\n    work := func() (string, error) {\n      if /* Some result is an error */ {\n        return \"\", theError\n      }\n      return \"IT SUCCEEDED\", nil\n    }\n    expBackoff := backoff.WithBackOff(backoff.NewExponentialBackOff())\n    result, err := backoff.Retry(ctx, work, expBackoff)\n    if err != nil {\n    \treturn nil, err\n    }\n    return result, nil\n  },\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatthewoestreich%2Fworkerpoolxt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatthewoestreich%2Fworkerpoolxt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatthewoestreich%2Fworkerpoolxt/lists"}