master-wiki/void/Readwise/Practical Concurrency in Go - GoRoutines, Mutexes, Channels and More.md

17 lines
1.3 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Practical Concurrency in Go - GoRoutines, Mutexes, Channels and More
![rw-book-cover](https://i.ytimg.com/vi/X24qXb4uWms/maxresdefault.jpg)
## Metadata
- Author: [[eldr-io]]
- Full Title: Practical Concurrency in Go - GoRoutines, Mutexes, Channels and More
- Category: #articles
- Document Tags: [[dev]] [[dev/go]]
- URL: https://youtube.com/watch?v=X24qXb4uWms&si=rsxeM5e_FgY5RCIg
- Archive: https://web-archive.alecodes.page/bookmarks?bf=1&search=&title=Practical%20Concurrency%20in%20Go%20-%20GoRoutines%2C%20Mutexes%2C%20Channels%20and%20More
> [!tldr]
> The video tutorial demonstrates how to create a concurrent currency exchange API using Go. It explains how to fetch currency rates simultaneously by utilizing goroutines and channels. The goal is to efficiently manage multiple API calls to retrieve currency data.
## Highlights
We don't really want to spin up a  thousand threads just to do API calls. What we   want instead is we want a worker pool of threads  that can basically, whenever they're available,   pick up work, and then they can do the work and  then return a result, and then they can pick up   the next work until there's no more work to be  done. And this is a great pattern called a worker   pattern or worker pool pattern. [View Highlight](https://read.readwise.io/read/01j7ngcdm7y0mhae1x7a524k9q))