Introduction to Concurrency in Golang
Get a brief introduction to the Go programming language.
Why should you learn concurrency and parallelism?
Large programs often use many smaller subprograms. For example, a web server handles requests made from web browsers and brings up HTML web pages in response. Each request is like a small program.
It would be ideal for programs like these to run their smaller components simultaneously. In the case of the web server, this translates into handling multiple requests at the same time. Simultaneously making progress on more than one task is known as concurrency.
Concurrency enables the simultaneous use of numerous applications, making it possible for other programs to use resources that aren’t being utilized. Without concurrency, each application has to complete its execution before the next application can execute.
Why should you learn concurrency in golang?
Several well-known computer languages, including Java and Python, use threads to enable concurrency. Go has rich support for concurrency using goroutines and channels, making it cheap and easy. Goroutines are cheap, lightweight threads. Channels are the conduits that allow for communication between goroutines.
In Golang, a goroutine is a function that can execute alongside other functions. A function is viewed as an independent unit of work when it’s created as a goroutine and scheduled to run on a free logical processor. Three features in Go—goroutines, channels, and selects—make concurrency easier when combined.
Intended audience
This course assumes a preliminary knowledge of Go as well as some experience programming with it. This course will cover how to use Golang to make robust programs, common design patterns and some common mistakes programmers make while writing programs.