{"id":38359044,"url":"https://github.com/equalsgibson/concur","last_synced_at":"2026-01-17T03:18:29.301Z","repository":{"id":226833787,"uuid":"769610053","full_name":"equalsgibson/concur","owner":"equalsgibson","description":"Easily run concurrent goroutines safely","archived":false,"fork":false,"pushed_at":"2025-02-16T01:31:52.000Z","size":43,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-16T02:24:46.846Z","etag":null,"topics":["concurrency-patterns","golang","golang-libary"],"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/equalsgibson.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":"2024-03-09T15:05:27.000Z","updated_at":"2025-02-16T01:31:56.000Z","dependencies_parsed_at":"2024-06-21T12:59:50.422Z","dependency_job_id":"a553ce2f-a537-4605-a4eb-26b138d494db","html_url":"https://github.com/equalsgibson/concur","commit_stats":null,"previous_names":["equalsgibson/concur"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/equalsgibson/concur","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/equalsgibson%2Fconcur","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/equalsgibson%2Fconcur/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/equalsgibson%2Fconcur/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/equalsgibson%2Fconcur/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/equalsgibson","download_url":"https://codeload.github.com/equalsgibson/concur/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/equalsgibson%2Fconcur/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28492637,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T02:39:23.645Z","status":"ssl_error","status_checked_at":"2026-01-17T02:34:19.649Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["concurrency-patterns","golang","golang-libary"],"created_at":"2026-01-17T03:18:29.200Z","updated_at":"2026-01-17T03:18:29.259Z","avatar_url":"https://github.com/equalsgibson.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- markdownlint-configure-file { \"MD004\": { \"style\": \"consistent\" } } --\u003e\n\u003c!-- markdownlint-disable MD033 --\u003e\n\n#\n\n\u003cp align=\"center\"\u003e\n  \u003cpicture\u003e\n    \u003cimg src=\"https://equalsgibson.github.io/concur/concur.jpg\" width=\"410\" height=\"205\" alt=\"Concur\"\u003e\n  \u003c/picture\u003e\n    \u003cbr\u003e\n    \u003cstrong\u003eEasily run concurrent goroutines safely\u003c/strong\u003e\n\u003c/p\u003e\n\n\u003c!-- markdownlint-enable MD033 --\u003e\n\n- **Easy to use**: Get up and running with the library in minutes\n- **Intuitive**: Get access to a powerful pattern within software development, without encountering common pitfalls or mistakes!\n- **Actively developed**: Ideas and contributions welcomed!\n\n---\n\n\u003cdiv align=\"right\"\u003e\n\n[![Go][golang]][golang-url]\n[![Go Reference][goref]][goref-url]\n[![Go Report Card][goreport]][goreport-url]\n\n\u003c/div\u003e\n\n## Getting Started\n\n`concur` is a Go library that allows you to safely and easily implement a concurrency pattern in your codebase. Install the latest version, and get up and running in minutes.\n\nThis library is currently used by the Five9-GO repository, to provide a reliable, safe way to interact with the Five9 API Websocket service.\n\n### What is concurrency, and why is it useful?\n\n```\nConcurrency is the composition of independently executing computations.\n\nConcurrency is a way to structure software, particularly as a way to write clean code that interacts well with the real world.\n\nIt is not parallelism.\n\n\t- Rob Pike, 2012\n```\n\nSimply put, concurrency in software allows you to create **fast**, **robust** systems that can be relied upon to be **consistent**. Some examples of what concurrency can do, as provided by the Go team:\n\n- [A Prime Number Sieve](https://go.dev/play/p/9U22NfrXeq)\n- [An RSS Feed fetcher](https://cs.opensource.google/go/x/website/+/master:_content/talks/2013/advconc/realmain/realmain.go)\n\n### Common pitfalls of concurrency that this library prevents\n\n- Race conditions\n- Deadlocks\n- Unpredictable or \"flaky\" tests when testing concurrent data models (such as Websockets, which are inherently asynchronous messages being sent back and forth between systems)\n\n### Install\n\n```shell\ngo get github.com/equalsgibson/concur@v0.0.3\n```\n\n### Example of ASyncReader\n\nRun the example ASyncReader with a mock asynchronous resource, along with a CPU and Memory profile.\n\nhttps://github.com/equalsgibson/concur/blob/e3d8905e740043133e92e11918fd1c2e47d7e0e3/examples/async_reader_timer.go/main.go#L1-L109\n\nExpected Output:\n\n```bash\ncgibson@wsl-ubuntuNexus:~/concur$ go run examples/async_reader_timer.go/main.go -cpuprofile cpu.prof -memprofile mem.prof\n2024/10/29 00:01:00 Current Iteration: 1 - Current goroutines: 4\n2024/10/29 00:01:01 Current Iteration: 2 - Current goroutines: 4\n...\n2024/10/29 00:01:03 Current Iteration: 299 - Current goroutines: 4\n2024/10/29 00:01:03 Current Iteration: 300 - Current goroutines: 4\n2024/10/29 00:01:05 Got an error response from Loop fetch function: end of the example - thanks for using the concur package\n```\n\nYou can then analyze the profiles created, using the [pprof](https://pkg.go.dev/runtime/pprof#hdr-Profiling_a_Go_program) tool\n\n\u003c!-- CONTRIBUTING --\u003e\n\n## Contributing\n\nContributions are what make the open source community such an amazing place to learn, get inspired, and create. Any contributions you make are **greatly appreciated**.\n\nIf you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag \"enhancement\".\nDon't forget to give the project a star! Thanks again!\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n\u003c!-- LICENSE --\u003e\n\n## License\n\nDistributed under the MIT License. See `LICENSE.txt` for more information.\n\n\u003c!-- CONTACT --\u003e\n\n## Contact\n\n[Chris Gibson (@equalsgibson)](https://github.com/equalsgibson)\n\nProject Link: [https://github.com/equalsgibson/concur](https://github.com/equalsgibson/concur)\n\n\u003c!-- ACKNOWLEDGMENTS --\u003e\n\n## Acknowledgments\n\n\u003c!-- MARKDOWN LINKS \u0026 IMAGES --\u003e\n\u003c!-- https://www.markdownguide.org/basic-syntax/#reference-style-links --\u003e\n\n[golang]: https://img.shields.io/badge/v1.21-000?logo=go\u0026logoColor=fff\u0026labelColor=444\u0026color=%2300ADD8\n[golang-url]: https://go.dev/\n[goref]: https://pkg.go.dev/badge/github.com/equalsgibson/concur.svg\n[goref-url]: https://pkg.go.dev/github.com/equalsgibson/concur\n[goreport]: https://goreportcard.com/badge/github.com/equalsgibson/concur\n[goreport-url]: https://goreportcard.com/report/github.com/equalsgibson/concur\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fequalsgibson%2Fconcur","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fequalsgibson%2Fconcur","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fequalsgibson%2Fconcur/lists"}