{"id":16683026,"url":"https://github.com/hlts2/lock-free","last_synced_at":"2025-03-13T12:14:22.120Z","repository":{"id":57493132,"uuid":"141429983","full_name":"hlts2/lock-free","owner":"hlts2","description":"Simple lock-free library written in golang","archived":false,"fork":false,"pushed_at":"2018-07-28T11:20:45.000Z","size":9,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-20T08:09:30.840Z","etag":null,"topics":["go","golang","golang-library","goroutine","goroutine-safe","hlts2","library","lock-free","threadsafe"],"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/hlts2.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":"2018-07-18T12:11:22.000Z","updated_at":"2018-09-15T11:00:39.000Z","dependencies_parsed_at":"2022-08-28T13:40:19.732Z","dependency_job_id":null,"html_url":"https://github.com/hlts2/lock-free","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hlts2%2Flock-free","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hlts2%2Flock-free/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hlts2%2Flock-free/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hlts2%2Flock-free/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hlts2","download_url":"https://codeload.github.com/hlts2/lock-free/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243401511,"owners_count":20285058,"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":["go","golang","golang-library","goroutine","goroutine-safe","hlts2","library","lock-free","threadsafe"],"created_at":"2024-10-12T14:10:06.527Z","updated_at":"2025-03-13T12:14:22.099Z","avatar_url":"https://github.com/hlts2.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lock-free\nlock-free is simple fastest lock-free library based on [cas](https://en.wikipedia.org/wiki/Compare-and-swap) written in golang.\n\n## Requirement\n\nGo (\u003e=1.8)\n\n## Installation\n\n```shell\ngo get github.com/hlts2/lock-free\n```\n\n## Example\n\n```go\nwg := new(sync.WaitGroup)\n\nlf := lockfree.New()\n\nfor i := 0; i \u003c size; i++ {\n    wg.Add(1)\n\n    go func(i int) {\n        defer wg.Done()\n\n        // In the block between Wait and Signal, it becomes gruoute-safe\n        lf.Wait()\n        cnt++\n\n        lf.Signal()\n    }(i)\n}\n\nwg.Wait()\n\n```\n\n## Author\n[hlts2](https://github.com/hlts2)\n\n## LICENSE\nlock-free released under MIT license, refer [LICENSE](https://github.com/hlts2/lock-free/blob/master/LICENSE) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhlts2%2Flock-free","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhlts2%2Flock-free","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhlts2%2Flock-free/lists"}