Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardGochannel internals hchan sudogSingle-choice MCQ

Consider a select with both a ready send case and a ready receive case at the moment it runs. How does the runtime decide which case to execute, and what guarantees this?

select { case ch1 <- v: // ch1 has a waiting receiver case x = <-ch2: // ch2 has a buffered value ready }