Skip to content

oguzhantasimaz/Go-Concurrency-Examples-In-Detail

Repository files navigation

Go Concurrency Examples In Detail

Welcome to the Go Concurrency Examples repository! This collection of code snippets and examples is designed to help you understand and implement concurrency in Go (Golang).

Before You Begin

This repository still under development. I will add more examples as I learn more about concurrency in Go.

Most of the folders contain a README.md file that explains the code in detail. I'll add README.md files to the remaining folders as soon as possible.

Introduction

Go is known for its powerful concurrency support through goroutines and channels. This repository aims to show Go's concurrency features and provide you with hands-on examples that cover a wide range of topics.

Getting Started

To get started with these examples, follow these steps:

  1. Clone the Repository: Clone this repository to your local machine using git clone.

    git clone https://github.com/oguzhantasimaz/Go-Concurrency-Examples-In-Detail.git

Contributing

If you have additional examples, improvements, or corrections to existing code, please feel free to open a pull request. Also feel free to customize this README.md file.

Notes

I strongly recommend you to research Communicating Sequential Processes (CSP). This is the theoretical basis of Go's concurrency model. I have added a link to the book below. You can also find a lot of resources on the internet.

Even though defer is not a concurrency feature, I added a DeferWorkLogic folder to show you how defer works. I think it is a good idea to know how defer works before you start learning concurrency in Go.

I also recommend checking out the VisualizeConcurrencyWithSVG folder. It is a good way to visualize concurrency in Go. For you to understand how it works, I added a README.md file to the folder. You can find more information there.

Resources