Brussels / 3 & 4 February 2024

schedule

The secret life of a goroutine


Goroutines are an exciting part of the Go language, but what are they? How are they created? How are they paused? How are they resumed? There are a lot of questions that the regular go programmer doesn't need to know and usually doesn't know, but if you, like me, are a curious person, you probably want to know more about what is going on under the hood.

Come with me on this interesting trip through one of the most outstanding features of the Go language, the goroutines, and discover what makes your Go programs tick! In this talk we are going to explore how is the life of a goroutine.

We are going to start talking about the go runtime scheduler in general, and we are going to talk about the most important structures there, P, M, G and Sched.

Once we have that clear we are going to explore how a goroutine is created and after the creation, how it change states, exploring the different states like Waiting, Runnable or Running, but also others. We are going to talk about the transitions between them to finish talking about the death of a goroutine.

After this talk you should have an intuition about how your goroutines are scheduled and why they transit from one state to another.

Speakers

Photo of Jesús Espino Jesús Espino

Attachments

Links