{"id":17958310,"url":"https://github.com/sheerun/queue","last_synced_at":"2025-03-25T03:31:00.670Z","repository":{"id":57485955,"uuid":"116583144","full_name":"sheerun/queue","owner":"sheerun","description":"Lightweight, thread-safe, blocking FIFO queue based on auto-resizing circular buffer","archived":false,"fork":false,"pushed_at":"2020-10-18T11:34:56.000Z","size":14,"stargazers_count":70,"open_issues_count":1,"forks_count":26,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-19T07:37:38.345Z","etag":null,"topics":["golang","queues","thread-safe"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sheerun.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-07T17:01:26.000Z","updated_at":"2023-05-01T21:59:22.000Z","dependencies_parsed_at":"2022-09-11T15:23:37.317Z","dependency_job_id":null,"html_url":"https://github.com/sheerun/queue","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sheerun%2Fqueue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sheerun%2Fqueue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sheerun%2Fqueue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sheerun%2Fqueue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sheerun","download_url":"https://codeload.github.com/sheerun/queue/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245394538,"owners_count":20608115,"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":["golang","queues","thread-safe"],"created_at":"2024-10-29T10:59:24.931Z","updated_at":"2025-03-25T03:31:00.403Z","avatar_url":"https://github.com/sheerun.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Queue\n\n[![GoDoc](https://godoc.org/github.com/sheerun/queue?status.svg)](https://godoc.org/github.com/sheerun/queue)\n[![Release](https://img.shields.io/github/release/sheerun/queue.svg)](https://github.com/sheerun/queue/releases/latest)\n[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](LICENSE.txt)\n\nLightweight, tested, performant, thread-safe, blocking FIFO queue based on auto-resizing circular buffer.\n\n## Usage\n\n```go\npackage main\n\nimport (\n  \"fmt\"\n  \"sync\"\n  \"time\"\n\n  \"github.com/sheerun/queue\"\n)\n\nfunc main() {\n  q := queue.New()\n  var wg sync.WaitGroup\n  wg.Add(2)\n\n  // Worker 1\n  go func() {\n    for i := 0; i \u003c 500; i++ {\n      item := q.Pop()\n      fmt.Printf(\"%v\\n\", item)\n      time.Sleep(10 * time.Millisecond)\n    }\n    wg.Done()\n  }()\n\n  // Worker 2\n  go func() {\n    for i := 0; i \u003c 500; i++ {\n      item := q.Pop()\n      fmt.Printf(\"%v\\n\", item)\n      time.Sleep(10 * time.Millisecond)\n    }\n    wg.Done()\n  }()\n\n  for i := 0; i \u003c 1000; i++ {\n    q.Append(i)\n  }\n\n  wg.Wait()\n}\n\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsheerun%2Fqueue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsheerun%2Fqueue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsheerun%2Fqueue/lists"}