{"id":13786673,"url":"https://github.com/viney-shih/go-lock","last_synced_at":"2026-02-01T02:09:40.584Z","repository":{"id":37047235,"uuid":"260195567","full_name":"viney-shih/go-lock","owner":"viney-shih","description":"go-lock is a lock library implementing read-write mutex and read-write trylock without starvation","archived":false,"fork":false,"pushed_at":"2022-06-18T04:20:42.000Z","size":789,"stargazers_count":118,"open_issues_count":0,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-11T22:39:31.158Z","etag":null,"topics":["go","golang","lock","locker","mutex","read-write-lock","readwritelock","trylock"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/viney-shih.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":"SECURITY.md","support":null}},"created_at":"2020-04-30T11:40:21.000Z","updated_at":"2025-02-19T06:56:34.000Z","dependencies_parsed_at":"2022-07-12T16:13:29.295Z","dependency_job_id":null,"html_url":"https://github.com/viney-shih/go-lock","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/viney-shih/go-lock","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viney-shih%2Fgo-lock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viney-shih%2Fgo-lock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viney-shih%2Fgo-lock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viney-shih%2Fgo-lock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/viney-shih","download_url":"https://codeload.github.com/viney-shih/go-lock/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viney-shih%2Fgo-lock/sbom","scorecard":{"id":922389,"data":{"date":"2025-08-11","repo":{"name":"github.com/viney-shih/go-lock","commit":"2f19fd8ce335e33e0ab9dccb1ff2ce820c3da332"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Security-Policy","score":4,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Warn: no linked content found","Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1","Info: Found text in security policy: SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Code-Review","score":0,"reason":"Found 1/29 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":9,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql-analysis.yml:29","Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql-analysis.yml:28","Warn: no topLevel permission defined: .github/workflows/codeql-analysis.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/viney-shih/go-lock/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:46: update your workflow using https://app.stepsecurity.io/secureworkflow/viney-shih/go-lock/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:57: update your workflow using https://app.stepsecurity.io/secureworkflow/viney-shih/go-lock/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:71: update your workflow using https://app.stepsecurity.io/secureworkflow/viney-shih/go-lock/codeql-analysis.yml/master?enable=pin","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"SAST","score":7,"reason":"SAST tool detected but not run on all commits","details":["Info: SAST configuration detected: CodeQL","Warn: 0 commits out of 5 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-25T05:37:37.911Z","repository_id":37047235,"created_at":"2025-08-25T05:37:37.912Z","updated_at":"2025-08-25T05:37:37.912Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28964640,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T01:25:30.373Z","status":"online","status_checked_at":"2026-02-01T02:00:08.102Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["go","golang","lock","locker","mutex","read-write-lock","readwritelock","trylock"],"created_at":"2024-08-03T19:01:27.820Z","updated_at":"2026-02-01T02:09:40.566Z","avatar_url":"https://github.com/viney-shih.png","language":"Go","funding_links":[],"categories":["公用事业公司","Utilities","工具库`可以提升效率的通用代码库和工具`","工具库","Utility"],"sub_categories":["实用程序/Miscellaneous","HTTP Clients","Fail injection","查询语","Utility/Miscellaneous"],"readme":"# go-lock\n\n[![GoDev](https://img.shields.io/badge/go.dev-doc-007d9c?style=flat-square\u0026logo=read-the-docs)](https://pkg.go.dev/github.com/viney-shih/go-lock?tab=doc)\n[![Build Status](https://travis-ci.com/viney-shih/go-lock.svg?branch=master)](https://travis-ci.com/github/viney-shih/go-lock)\n[![Go Report Card](https://goreportcard.com/badge/github.com/viney-shih/go-lock)](https://goreportcard.com/report/github.com/viney-shih/go-lock)\n[![Codecov](https://codecov.io/gh/viney-shih/go-lock/branch/master/graph/badge.svg)](https://codecov.io/gh/viney-shih/go-lock)\n[![Coverage Status](https://coveralls.io/repos/github/viney-shih/go-lock/badge.svg?branch=master)](https://coveralls.io/github/viney-shih/go-lock?branch=master)\n[![Sourcegraph](https://sourcegraph.com/github.com/viney-shih/go-lock/-/badge.svg)](https://sourcegraph.com/github.com/viney-shih/go-lock?badge)\n[![License](http://img.shields.io/badge/License-Apache_2-red.svg?style=flat)](http://www.apache.org/licenses/LICENSE-2.0)\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fviney-shih%2Fgo-lock.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fviney-shih%2Fgo-lock?ref=badge_shield)\n[![Mentioned in Awesome Go](https://awesome.re/mentioned-badge.svg)](https://github.com/avelino/awesome-go#utilities)\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/logo.png\" title=\"go-lock\" /\u003e\n\u003c/p\u003e\n\n**go-lock** is a Golang library implementing an effcient read-write lock with the following built-in mechanism:\n- Mutex with timeout mechanism\n- Trylock\n- No-starve read-write solution\n\nNative `sync/Mutex` and `sync/RWMutex` are very powerful and reliable. However, it became a disaster if the lock was not released as expected. Or, someone was holding the lock too long at the peak time leading whole system blocked. Dealing with those cases, **go-lock** implements `TryLock`, `TryLockWithTimeout` and `TryLockWithContext` function in addition to Lock and Unlock. It provides flexibility to control the resources.\n\n## Installation\n\n```sh\ngo get github.com/viney-shih/go-lock\n```\n\n## Example\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"sync/atomic\"\n\t\"time\"\n\n\tlock \"github.com/viney-shih/go-lock\"\n)\n\nfunc main() {\n\t// set RWMutex with CAS mechanism (CASMutex).\n\tvar rwMut lock.RWMutex = lock.NewCASMutex()\n\t// set default value\n\tcount := int32(0)\n\n\t// block here\n\trwMut.Lock()\n\tgo func() {\n\t\ttime.Sleep(50 * time.Millisecond)\n\t\tfmt.Println(\"Now is\", atomic.AddInt32(\u0026count, 1)) // Now is 1\n\t\trwMut.Unlock()\n\t}()\n\n\t// waiting for previous goroutine releasing the lock, and locking it again\n\trwMut.Lock()\n\tfmt.Println(\"Now is\", atomic.AddInt32(\u0026count, 2)) // Now is 3\n\n\t// TryLock without blocking\n\t// Return false, because the lock is not released.\n\tfmt.Println(\"Return\", rwMut.TryLock())\n\n\t// RTryLockWithTimeout without blocking\n\t// Return false, because the lock is not released.\n\tfmt.Println(\"Return\", rwMut.RTryLockWithTimeout(50*time.Millisecond))\n\n\t// TryLockWithContext without blocking\n\tctx, cancel := context.WithTimeout(context.TODO(), 50*time.Millisecond)\n\tdefer cancel()\n\t// Return false, because the lock is not released.\n\tfmt.Println(\"Return\", rwMut.TryLockWithContext(ctx))\n\n\t// release the lock in the end.\n\trwMut.Unlock()\n\n\t// Output:\n\t// Now is 1\n\t// Now is 3\n\t// Return false\n\t// Return false\n\t// Return false\n}\n```\n\n- [More examples](./cas_test.go)\n- [Full API documentation](https://pkg.go.dev/github.com/viney-shih/go-lock?tab=doc)\n\n## Benchmarks\n- Run on MacBook Pro (Retina, 15-inch, Mid 2015) 2.5 GHz Quad-Core Intel Core i7 16 GB 1600 MHz DDR3 using Go 1.15.2\n- Run with 1, 2, 4, 8 and 16 cpu to show it scales well...16 is double the # of logical cores on this machine.\n\n```\ngo test -cpu=1,2,4,8,16 -bench=. -benchmem=true\n\ngoos: darwin\ngoarch: amd64\npkg: github.com/viney-shih/go-lock\n\n(sync.RWMutex)\nBenchmarkRWMutexLock                       \t42591765\t        27.4 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkRWMutexLock-2                     \t42713179\t        27.5 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkRWMutexLock-4                     \t44348323\t        27.5 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkRWMutexLock-8                     \t44135148\t        27.9 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkRWMutexLock-16                    \t43566165\t        27.5 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkConcurrentRWMutexLock             \t42971319\t        27.5 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkConcurrentRWMutexLock-2           \t20131005\t        57.5 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkConcurrentRWMutexLock-4           \t10752337\t       115 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkConcurrentRWMutexLock-8           \t11434335\t       105 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkConcurrentRWMutexLock-16          \t10495626\t       109 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkConcurrent50RWMutexLock           \t27979630\t        42.8 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkConcurrent50RWMutexLock-2         \t13037742\t        86.6 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkConcurrent50RWMutexLock-4         \t 9143397\t       134 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkConcurrent50RWMutexLock-8         \t 8335652\t       139 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkConcurrent50RWMutexLock-16        \t 7876855\t       150 ns/op\t       0 B/op\t       0 allocs/op\n\n(ChanMutex)\nBenchmarkChanMutexLock                     \t22619928\t        51.8 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkChanMutexLock-2                   \t22769630\t        51.6 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkChanMutexLock-4                   \t23096103\t        51.7 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkChanMutexLock-8                   \t22627267\t        51.1 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkChanMutexLock-16                  \t23092266\t        51.7 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkConcurrentChanMutexLock           \t23422556\t        51.8 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkConcurrentChanMutexLock-2         \t 6101949\t       201 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkConcurrentChanMutexLock-4         \t 5882083\t       200 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkConcurrentChanMutexLock-8         \t 5827183\t       211 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkConcurrentChanMutexLock-16        \t 5577098\t       215 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkChanMutexTryLock                  \t22272500\t        51.8 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkChanMutexTryLock-2                \t23004806\t        52.2 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkChanMutexTryLock-4                \t22461870\t        52.3 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkChanMutexTryLock-8                \t22901328\t        53.8 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkChanMutexTryLock-16               \t22334739\t        55.4 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkConcurrentChanMutexTryLock        \t22112250\t        53.9 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkConcurrentChanMutexTryLock-2      \t13806072\t        85.0 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkConcurrentChanMutexTryLock-4      \t45892635\t        32.6 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkConcurrentChanMutexTryLock-8      \t396310569\t         2.86 ns/op\t       0 B/op\t       0 allocs/op\nBenchmarkConcurrentChanMutexTryLock-16     \t512990590\t         2.35 ns/op\t       0 B/op\t       0 allocs/op\n\n(CASMutex)\nBenchmarkCASMutexLock                      \t 6160122\t       186 ns/op\t      96 B/op\t       1 allocs/op\nBenchmarkCASMutexLock-2                    \t 7507022\t       156 ns/op\t      96 B/op\t       1 allocs/op\nBenchmarkCASMutexLock-4                    \t 7646648\t       156 ns/op\t      96 B/op\t       1 allocs/op\nBenchmarkCASMutexLock-8                    \t 7559616\t       156 ns/op\t      96 B/op\t       1 allocs/op\nBenchmarkCASMutexLock-16                   \t 7576237\t       158 ns/op\t      96 B/op\t       1 allocs/op\nBenchmarkConcurrentCASMutexLock            \t 6375879\t       185 ns/op\t      96 B/op\t       1 allocs/op\nBenchmarkConcurrentCASMutexLock-2          \t 1690890\t       706 ns/op\t     251 B/op\t       3 allocs/op\nBenchmarkConcurrentCASMutexLock-4          \t 1677104\t       714 ns/op\t     255 B/op\t       3 allocs/op\nBenchmarkConcurrentCASMutexLock-8          \t 1808582\t       639 ns/op\t     255 B/op\t       3 allocs/op\nBenchmarkConcurrentCASMutexLock-16         \t 1918422\t       622 ns/op\t     255 B/op\t       3 allocs/op\nBenchmarkConcurrent50CASMutexLock          \t 5650274\t       210 ns/op\t      96 B/op\t       1 allocs/op\nBenchmarkConcurrent50CASMutexLock-2        \t 1698381\t       707 ns/op\t     247 B/op\t       3 allocs/op\nBenchmarkConcurrent50CASMutexLock-4        \t 1697070\t       707 ns/op\t     255 B/op\t       3 allocs/op\nBenchmarkConcurrent50CASMutexLock-8        \t 1809859\t       655 ns/op\t     255 B/op\t       3 allocs/op\nBenchmarkConcurrent50CASMutexLock-16       \t 1801652\t       646 ns/op\t     256 B/op\t       4 allocs/op\nBenchmarkCASMutexTryLock                   \t 6593228\t       182 ns/op\t      96 B/op\t       1 allocs/op\nBenchmarkCASMutexTryLock-2                 \t 7703084\t       154 ns/op\t      96 B/op\t       1 allocs/op\nBenchmarkCASMutexTryLock-4                 \t 7790750\t       151 ns/op\t      96 B/op\t       1 allocs/op\nBenchmarkCASMutexTryLock-8                 \t 7756263\t       152 ns/op\t      96 B/op\t       1 allocs/op\nBenchmarkCASMutexTryLock-16                \t 7741186\t       152 ns/op\t      96 B/op\t       1 allocs/op\nBenchmarkConcurrentCASMutexTryLock         \t 6509828\t       189 ns/op\t      96 B/op\t       1 allocs/op\nBenchmarkConcurrentCASMutexTryLock-2       \t14058355\t        82.2 ns/op\t      17 B/op\t       0 allocs/op\nBenchmarkConcurrentCASMutexTryLock-4       \t16875369\t        71.4 ns/op\t       8 B/op\t       0 allocs/op\nBenchmarkConcurrentCASMutexTryLock-8       \t10985379\t       109 ns/op\t       4 B/op\t       0 allocs/op\nBenchmarkConcurrentCASMutexTryLock-16      \t12405752\t       104 ns/op\t       1 B/op\t       0 allocs/op\nBenchmarkConcurrent50CASMutexTryLock       \t 5631146\t       204 ns/op\t      96 B/op\t       1 allocs/op\nBenchmarkConcurrent50CASMutexTryLock-2     \t 6518946\t       182 ns/op\t      61 B/op\t       0 allocs/op\nBenchmarkConcurrent50CASMutexTryLock-4     \t 6937346\t       174 ns/op\t      43 B/op\t       0 allocs/op\nBenchmarkConcurrent50CASMutexTryLock-8     \t 6493034\t       182 ns/op\t      39 B/op\t       0 allocs/op\nBenchmarkConcurrent50CASMutexTryLock-16    \t 6177854\t       202 ns/op\t      41 B/op\t       0 allocs/op\nPASS\n\n```\n\n## References\n- https://github.com/golang/go/issues/6123\n- https://github.com/LK4D4/trylock\n- https://github.com/OneOfOne/go-utils/tree/master/sync\n- https://github.com/lrita/gosync\n- https://github.com/google/netstack/blob/master/tmutex/tmutex.go\n- https://github.com/subchen/go-trylock\n\n## License\n[Apache-2.0](https://opensource.org/licenses/Apache-2.0)\n\n\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fviney-shih%2Fgo-lock.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fviney-shih%2Fgo-lock?ref=badge_large)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviney-shih%2Fgo-lock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fviney-shih%2Fgo-lock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviney-shih%2Fgo-lock/lists"}