{"id":23960387,"url":"https://github.com/minhthong582000/atomicringbuffer","last_synced_at":"2025-02-24T12:19:14.435Z","repository":{"id":270968771,"uuid":"911992001","full_name":"minhthong582000/atomicringbuffer","owner":"minhthong582000","description":"A lock-free single producer, single consumer ringbuffer implementation in Go","archived":false,"fork":false,"pushed_at":"2025-01-12T10:40:26.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-12T11:29:37.449Z","etag":null,"topics":["circular-queue","go","lock-free","ring-buffer"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/minhthong582000.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}},"created_at":"2025-01-04T12:03:09.000Z","updated_at":"2025-01-12T10:39:59.000Z","dependencies_parsed_at":"2025-01-04T13:37:54.856Z","dependency_job_id":null,"html_url":"https://github.com/minhthong582000/atomicringbuffer","commit_stats":null,"previous_names":["minhthong582000/atomicringbuffer"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minhthong582000%2Fatomicringbuffer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minhthong582000%2Fatomicringbuffer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minhthong582000%2Fatomicringbuffer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minhthong582000%2Fatomicringbuffer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/minhthong582000","download_url":"https://codeload.github.com/minhthong582000/atomicringbuffer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240475239,"owners_count":19807292,"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":["circular-queue","go","lock-free","ring-buffer"],"created_at":"2025-01-06T19:27:48.856Z","updated_at":"2025-02-24T12:19:14.428Z","avatar_url":"https://github.com/minhthong582000.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ringbuffer\n\nA lock-free single producer, single consumer ringbuffer implementation in Go using atomic operations.\n\n## Installation\n\n```bash\ngo get github.com/minhthong582000/atomicringbuffer\n```\n\n## Usage\n\n```go\nimport \"github.com/minhthong582000/atomicringbuffer\"\n```\n\nConstruct a new ringbuffer with a given size and type `T`:\n\n```go\nrb := atomicringbuffer.NewRingBuffer[int](1024) // capacity = 1024, type = int\n```\n\nPush an item to the back of the ringbuffer:\n\n```go\nerr := rb.PushBack(2)\nif err != nil {\n    // Handle error\n}\n```\n\nPop an item from the front of the ringbuffer:\n\n```go\nitem, err := rb.PopFront()\nif err != nil {\n    // Handle error\n}\n\nfmt.Println(item)\n```\n\n## Simple Example\n\nA simple example of lock-free single producer, single consumer:\n\n```bash\ngo run example/spsc/main.go\n```\n\n## Contributing\n\nFeel free to fork or clone this repository, explore the code, and contribute by submitting pull requests. Contributions, whether they’re bug fixes, improvements, or new features, are always welcome!\n\n## License\n\nDistributed under the GPLv3 License. See `LICENSE.md` file for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminhthong582000%2Fatomicringbuffer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fminhthong582000%2Fatomicringbuffer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminhthong582000%2Fatomicringbuffer/lists"}