{"id":37415971,"url":"https://github.com/fireflycons/concurrentqueue","last_synced_at":"2026-01-16T06:01:39.053Z","repository":{"id":332103069,"uuid":"1130877096","full_name":"fireflycons/concurrentqueue","owner":"fireflycons","description":"Package queue implements a mutex-free channel-based queue.","archived":false,"fork":false,"pushed_at":"2026-01-12T12:39:34.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-01-12T19:45:41.040Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/fireflycons.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":"2026-01-09T06:25:53.000Z","updated_at":"2026-01-12T12:38:39.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/fireflycons/concurrentqueue","commit_stats":null,"previous_names":["fireflycons/concurrentqueue"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/fireflycons/concurrentqueue","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fireflycons%2Fconcurrentqueue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fireflycons%2Fconcurrentqueue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fireflycons%2Fconcurrentqueue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fireflycons%2Fconcurrentqueue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fireflycons","download_url":"https://codeload.github.com/fireflycons/concurrentqueue/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fireflycons%2Fconcurrentqueue/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28477589,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T03:13:13.607Z","status":"ssl_error","status_checked_at":"2026-01-16T03:11:47.863Z","response_time":107,"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":[],"created_at":"2026-01-16T06:00:46.772Z","updated_at":"2026-01-16T06:01:38.990Z","avatar_url":"https://github.com/fireflycons.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- Code generated by gomarkdoc. DO NOT EDIT --\u003e\n\n# queue\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/fireflycons/concurrentqueue.svg)](https://pkg.go.dev/github.com/fireflycons/concurrentqueue) [![build](https://github.com/fireflycons/concurrentqueue/actions/workflows/build.yml/badge.svg)](https://github.com/fireflycons/concurrentqueue/actions/workflows/build.yml) [![Go Report Card](https://goreportcard.com/badge/github.com/fireflycons/concurrentqueue)](https://goreportcard.com/report/github.com/fireflycons/concurrentqueue)\n\n\nPackage queue implements a mutex\\-free channel\\-based generic queue. It is not designed for raw speed, but rather to be used as a data source for things like worker pools where reading input from a channel makes sense.\n\nThe queue is backed by a ring buffer with a default initial capacity of 256 elements that grows as needed. A constructor method is provided to set the initial capacity if desired.\n\nWhere locking is required, it is done at the ring buffer level using spinlocks to minimize contention.\n\n## Features\n\n* Dependency free\n* Mutex free\n* Concurrent\n* Generic\n* Channel based implementation\n* Backed by a ringbuffer for reduced allocs\n* Used by my [workerpool](https://pkg.go.dev/github.com/fireflycons/workerpool) implementation\n\n## Example\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\tqueue \"github.com/fireflycons/concurrentqueue\"\n)\n\nfunc main() {\n\tq := queue.New[int]()\n\n\tfor i := range 10 {\n\t\t_ = q.Enqueue(i)\n\t}\n\n\t// Close the queue to signal no more elements will be added\n\tq.Close()\n\n\t// Dequeue is a channel, therefore it would block until elements are available\n\t// or the queue is closed and emptied.\n\tfor v := range q.Dequeue() {\n\t\tfmt.Println(v)\n\t}\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffireflycons%2Fconcurrentqueue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffireflycons%2Fconcurrentqueue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffireflycons%2Fconcurrentqueue/lists"}