2min chapter

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

Get the Snipd
podcast app

Unlock the knowledge in podcasts with the podcast player of the future.
App store bannerPlay store banner

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode

Save any
moment

Hear something you like? Tap your headphones to save it with AI-generated key takeaways

Share
& Export

Send highlights to Twitter, WhatsApp or export them to Notion, Readwise & more

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode