{"id":22097524,"url":"https://github.com/anazcodes/go-concurrency","last_synced_at":"2025-08-08T02:11:06.640Z","repository":{"id":171306354,"uuid":"647647640","full_name":"anazcodes/go-concurrency","owner":"anazcodes","description":"Go lang concurrency practice with Go routines, Channels, Wait Groups and Select statement.","archived":false,"fork":false,"pushed_at":"2023-10-16T07:35:26.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-29T07:43:00.303Z","etag":null,"topics":["concurrency","golang"],"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/anazcodes.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-05-31T08:22:50.000Z","updated_at":"2024-09-24T15:42:32.000Z","dependencies_parsed_at":"2024-06-20T21:38:48.059Z","dependency_job_id":"f1a1147d-e4c4-4791-b538-d3815dc1b5fa","html_url":"https://github.com/anazcodes/go-concurrency","commit_stats":null,"previous_names":["anazibinurasheed/go-concurrency","anazcodes/go-concurrency"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anazcodes%2Fgo-concurrency","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anazcodes%2Fgo-concurrency/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anazcodes%2Fgo-concurrency/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anazcodes%2Fgo-concurrency/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anazcodes","download_url":"https://codeload.github.com/anazcodes/go-concurrency/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245191848,"owners_count":20575291,"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":["concurrency","golang"],"created_at":"2024-12-01T04:15:49.362Z","updated_at":"2025-03-24T01:20:39.423Z","avatar_url":"https://github.com/anazcodes.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go-concurrency patterns and practices\n\nThis repository contains Go-concurrency patterns and practices.\nIt contains different implementations using channels, switch, go-routines .\n\n\n## Why concurrency supported in go ?\nLook around you. What do you see?\n\nDo you see a single-stepping world doing one thing at a time?\n\nOr do you see a complex world of interacting, independently behaving pieces?\n\nThat's why. Sequential processing on its own does not model the world's behavior.\n\n## What is concurrency?\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\n## Concurrency is not parallelism\n\nConcurrency is not parallelism, although it enables parallelism.\n\nIf you have only one processor, your program can still be concurrent but it cannot be parallel.\n\nOn the other hand, a well-written concurrent program might run efficiently in parallel on a multiprocessor. That property could be important...\n\n## What is a goroutine?\n It's an independently executing function, launched by a go statement.\n\nIt has its own call stack, which grows and shrinks as required.\n\nIt's very cheap. It's practical to have thousands, even hundreds of thousands of goroutines.\n\nIt's not a thread.\n\nThere might be only one thread in a program with thousands of goroutines.\n\nInstead, goroutines are multiplexed dynamically onto threads as needed to keep all the goroutines running.\n\nBut if you think of it as a very cheap thread, you won't be far off.\n\n\n## Channels\nA channel in Go provides a connection between two goroutines, allowing them to communicate.\n\n     Receiving from a channel.\n     The \"arrow\" indicates the direction of data flow.\n    value = \u003c-c\n     c \u003c- \"msg\"\n\n- A sender and receiver must both be ready to play their part in the communication. Otherwise we wait until they are.\nThus channels both communicate and synchronize.     \n\n- buffer: Buffering removes synchronization.\n\n\n### The Go approach\nDon't communicate by sharing memory, share memory by communicating.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanazcodes%2Fgo-concurrency","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanazcodes%2Fgo-concurrency","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanazcodes%2Fgo-concurrency/lists"}