Go under the hood
Go: Under the Hood

Chapter 11 Synchronization Primitives and Patterns

The fact that the construction can be defined in terms of simpler underlying primitives is a useful guarantee that its inclusion is logically consistent with the remainder of the language.
-- C.A.R. Hoare

In modern programming languages, synchronization between multiple threads is usually achieved through traditional shared-memory mechanisms such as mutexes and semaphores. Go takes a different path from most languages in its choice of synchronization primitives: message-passing synchronization based on channels and select is the language’s true synchronization primitive in the proper sense. The concepts that are “traditionally” treated as primitives, such as atomics, mutexes, condition variables, and thread-local resources, are recast in Go as user-space synchronization patterns, giving the language its own distinctive character.