{"id":28399345,"url":"https://github.com/karpeleslab/idlock","last_synced_at":"2025-06-28T19:31:44.147Z","repository":{"id":57504295,"uuid":"230720852","full_name":"KarpelesLab/idlock","owner":"KarpelesLab","description":"Lock based on arbitrary numbers, in Go","archived":false,"fork":false,"pushed_at":"2019-12-29T11:01:35.000Z","size":12,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-01T15:49:36.133Z","etag":null,"topics":["golang","multithreading"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KarpelesLab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-12-29T08:00:05.000Z","updated_at":"2019-12-29T11:01:37.000Z","dependencies_parsed_at":"2022-09-26T18:11:28.812Z","dependency_job_id":null,"html_url":"https://github.com/KarpelesLab/idlock","commit_stats":null,"previous_names":["magicaltux/idlock"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/KarpelesLab/idlock","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KarpelesLab%2Fidlock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KarpelesLab%2Fidlock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KarpelesLab%2Fidlock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KarpelesLab%2Fidlock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KarpelesLab","download_url":"https://codeload.github.com/KarpelesLab/idlock/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KarpelesLab%2Fidlock/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262484061,"owners_count":23318386,"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","multithreading"],"created_at":"2025-06-01T08:08:31.928Z","updated_at":"2025-06-28T19:31:44.131Z","avatar_url":"https://github.com/KarpelesLab.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![GoDoc](https://godoc.org/github.com/KarpelesLab/idlock?status.svg)](https://godoc.org/github.com/KarpelesLab/idlock)\n\n# IntLock, etc\n\nVery simple lock-by-id object for various purposes. Keep multiple locks under arbitrary ID values.\n\nExample:\n\n```Go\nimport (\n\t\"github.com/KarpelesLab/idlock\"\n\t\"fmt\"\n)\n\nfunc test(lk *idlock.IntLock, c chan struct{}) {\n\tlk.Lock(2)\n\tdefer lk.Unlock(2)\n\n\tfmt.Println(\"In test\")\n\n\tclose(c)\n}\n\nfunc main() {\n\tlk := idlock.NewInt()\n\n\tlk.Lock(1, 2)\n\n\tc := make(chan struct{})\n\n\tgo test(lk, c)\n\n\tfmt.Println(\"Unlocking ...\")\n\tlk.Unlock(2)\n\n\t\u003c-c\n\n\tlk.Unlock(1)\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarpeleslab%2Fidlock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkarpeleslab%2Fidlock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarpeleslab%2Fidlock/lists"}