Go Time: Golang, Software Engineering cover image

Scott Mansfield on Go at Netflix

Go Time: Golang, Software Engineering

CHAPTER

Using a Mutex for Concurrency

I would say just throw it out there. If people who are starting out learn how to use a mutex so you can then make a choice if that's what you need versus a channel. I also think it's important to remember that nothing is magic. So for a channel there is a fast path. But for above there's no magic. You have pretty smart code at the front whenever you're trying to insert something but if you end up competing for that it's a lot. That's the way it works. It's not like you're going to magically be faster by having this channel for concurrency. The language has to have some sort of management of that concurrent behavior internally.

00:00
Transcript
Play full episode

Remember Everything You Learn from Podcasts

Save insights instantly, chat with episodes, and build lasting knowledge - all powered by AI.
App store bannerPlay store banner