Deep dive into the select statement

The select statement is a cornerstone of Go's concurrency model, enabling developers to coordinate multiple channel operations with precision. This talk provides a deep technical exploration of its implementation across Go's compiler and runtime layers. We examine how the compiler transforms high-level select syntax into executable code through IR manipulation, including special-case handling for zero, single, and multi-case scenarios. The runtime implementation reveals a sophisticated selection algorithm featuring randomized polling order, channel locking, and goroutine scheduling mechanics. Come to my talk and gain some insight into how select works under the hood.

LEVEL: Advanced

Place
Leonardo
Length
45 min
When
October 6th, 2025
15:15

Abstract

The select statement is a cornerstone of Go's concurrency model, enabling developers to coordinate multiple channel operations with precision. This talk provides a deep technical exploration of its implementation across Go's compiler and runtime layers. We examine how the compiler transforms high-level select syntax into executable code through IR manipulation, including special-case handling for zero, single, and multi-case scenarios. The runtime implementation reveals a sophisticated selection algorithm featuring randomized polling order, channel locking, and goroutine scheduling mechanics. Come to my talk and gain some insight into how select works under the hood.

GoLab is a conference made by Develer.
Develer is a company based in Campi Bisenzio, near Florence. Our motto is : "Technology to give life to your products". We produce hardware and software to create exceptional products and to improve industrial processes and people's well being.
In Develer we have passion for the new technologies and we offer our clients effective solutions that are also efficient, simple and safe for the end users. We also believe in a friendly and welcoming environment where anybody can give their contribution. This passion and this vision are what we've been driven to organize our conference "made by developers for developers".


Subscribe to our newsletter

We hate spam just as much as you do, which is why we promise to only send you relevant communications. We respect your privacy and will never share your information with third parties.
©2025 GoLab | The international conference on Go in Florence-Design & devCantiere Creativo-Made withDatoCMS