Please purchase the course to watch this video.

Full Course
Concurrency in Go is a powerful feature that enables developers to handle multiple tasks simultaneously, which can greatly enhance the efficiency of applications. This lesson focuses on implementing concurrency in a practical way, specifically through the counting of multiple files concurrently, thereby enriching an existing application. Key topics include understanding the foundational concepts of concurrency, such as thread synchronization and race conditions, as well as utilizing Go’s unique channels for communication between concurrent functions. Additionally, the lesson revisits previously discussed algorithms for counting bytes, words, and lines from an IO.reader
, setting the stage for performance comparisons of different algorithms related to data streaming in future modules. By mastering these concepts, developers can optimize their code and harness the full potential of Go’s concurrency capabilities.
No links available for this lesson.
One of the most powerful features when it comes to Go is its ability to perform concurrency using a simple keyword, the Go keyword. Concurrency itself can be a pretty scary topic, especially if you're just getting started to the language, and sometimes it's difficult to know how to actually use concurrency when it comes to your own code.
So in this module, we're going to go through a couple of lessons looking at actually how to perform concurrency, but doing so in a way that we can add new features or a new feature into our application, which is the ability to count multiple files at the same time.
Once we've taken a look at concurrency and all of the caveats that come with it, such as thread synchronization and dealing with race conditions, as well as one of the most powerful types that Go has, channels, we'll then begin looking at a few types and functions that need concurrency in order to work, that are provided by the IO package.
These methods and types are related to data streaming or data processing, of which Go has many different primitives and constructs that make it really simple to achieve. In order to do this, we're going to dig up our old algorithms that we wrote in the last lesson, specifically when it came to counting the individual bytes, words and lines from an IO.reader
that we implemented earlier on in the course.
Then in the next module, once we've managed to implement these new algorithms related to data streaming, we'll then take a look at actually comparing their performance in order to determine which algorithm is going to be the best.