{"id":19083085,"url":"https://github.com/cr-mao/go-concurrency","last_synced_at":"2026-06-25T07:31:05.676Z","repository":{"id":190539962,"uuid":"627453362","full_name":"cr-mao/go-concurrency","owner":"cr-mao","description":"go并发编程总结","archived":false,"fork":false,"pushed_at":"2024-08-08T09:16:12.000Z","size":36,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-22T06:25:18.187Z","etag":null,"topics":["go-concurrency","golang-concurrency","sync"],"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/cr-mao.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-13T13:53:59.000Z","updated_at":"2024-08-08T09:16:15.000Z","dependencies_parsed_at":"2024-08-08T11:26:09.991Z","dependency_job_id":"7a569d1a-8845-4aad-a79e-fdd02081da7a","html_url":"https://github.com/cr-mao/go-concurrency","commit_stats":null,"previous_names":["cr-mao/go-concurrency"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cr-mao/go-concurrency","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cr-mao%2Fgo-concurrency","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cr-mao%2Fgo-concurrency/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cr-mao%2Fgo-concurrency/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cr-mao%2Fgo-concurrency/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cr-mao","download_url":"https://codeload.github.com/cr-mao/go-concurrency/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cr-mao%2Fgo-concurrency/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34765321,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-25T02:00:05.521Z","response_time":101,"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-concurrency","golang-concurrency","sync"],"created_at":"2024-11-09T02:45:59.488Z","updated_at":"2026-06-25T07:31:05.653Z","avatar_url":"https://github.com/cr-mao.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Go Concurrency\n\ngo 并发相关总结\n\n- sync.Mutex\n- sync.RWMutex\n- sync.Once\n- sync.Cond\n- sync.Map\n- sync.WaitGroup\n- sync.Pool\n- channel\n- context\n- 内存模型\n\n\n如何选择\n1. 共享资源的并发访问使用传统并发原语；\n2. 复杂的任务编排和消息传递使用 Channel；\n3. 消息通知机制使用 Channel，除非只想 signal 一个 goroutine，才使用 Cond；\n4. 简单等待所有任务的完成用 WaitGroup，也有 Channel 的推崇者用 Channel，都可以；\n5. 需要和 Select 语句结合，使用 Channel；\n6. 需要和超时配合时，使用 Channel 和 Context。\n\n[go中happens-before 保证](memory/readme.md)\n\n\n\n## links\n\n- 《极客时间-go并发编程实战课》 - 鸟窝\n- 《深入理解 go 并发编程 》-  鸟窝\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcr-mao%2Fgo-concurrency","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcr-mao%2Fgo-concurrency","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcr-mao%2Fgo-concurrency/lists"}