liveBook · Manning

Go

As explained in Learn Concurrent Programming with Go

Go is a statically typed, compiled programming language designed for simplicity, readability, and efficient execution, including built-in support for concurrency.

Go is designed for readable, efficient, high-performance concurrency. It provides tools for expressing concurrent executions, coordinating them, and choosing between message passing and shared-memory synchronization. section 1.5 section 1.1

Concurrency helps software perform independent work at the same time, use multiple CPU cores, remain responsive during input/output waits, and model complex business interactions. A payroll calculation that exceeds an overnight processing window illustrates why this matters. section 1.0 section 1.1

Go’s main concurrency building blocks include:

  • Goroutines provide lightweight units of concurrent execution; programs can create them without directly managing resource allocation. section 1.5.1
  • Channels let goroutines exchange messages and synchronize their work. section 1.5.1
  • CSP-style design isolates goroutines and has them communicate through channels, reducing the risk of race conditions. section 1.5.2
  • Classic primitives such as mutexes and condition variables remain available when shared memory better fits the problem or offers better performance. section 1.5.2

Parallelizing payroll work

A payroll system processing tens of thousands of employees can divide independent calculations among concurrent executions instead of relying on one long sequential run. Goroutines can perform the work, while channels can communicate results and coordinate completion; shared-memory primitives remain an alternative when the task requires them. section 1.0 section 1.5.1

Figure 1.5 A concurrent Go application using CSP

Use the figure to visualize isolated goroutines communicating and synchronizing through channels in a CSP-style Go application. section 1.5.2

How Learn Concurrent Programming with Go covers it

How deep it goes
Introduces operating-system concurrency, goroutines, channels, CSP, shared memory, and synchronization before deferring advanced topics.
Examples
Uses an overloaded payroll system, large employee calculations, goroutine coordination, and channel-based communication as practical illustrations.
What it assumes
Assumes Go or similar C-style language experience while introducing concurrency concepts from the operating-system level.
What you can do after
Build concurrent programs that coordinate executions through goroutines, channels, or classic synchronization primitives.
How it connects
Connects Go with concurrency, goroutines, channels, CSP, message passing, memory sharing, mutexes, condition variables, and race conditions.

Also explained in

Compare how 11 books explain Go →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Learn Concurrent Programming with Go. The section links point to the parts of the book it draws on.