Is this how goroutine scheduling works?
I have a mental model of how Go schedules goroutines, I think, but I want to be sure it's correct. How I think it works is that goroutines on a single thread are scheduled by one goroutine yielding control to another, similar to cooperative multitasking (like Fibers in ruby). Many operations cause the goroutines to yield, like when there's IO of any sort, or when you use select or channels (internal IO, kinda). If there are multiple OS threads, then waiting goroutines are scheduled onto each of the threads as the goroutines running on the threads yield control.
Is this how goroutine scheduling works?