Go scheduler

The part of the Go runtime that decides which goroutine runs on which operating system thread, and when.

In more detail

It switches between goroutines when they block, for example on a channel or a network call. Its order is not guaranteed, so never write code that depends on which goroutine runs first. Sort results afterwards if a report needs a stable order.

Related terms

Taught in

References