liveBook · Manning

Dynamic linear pipeline

As explained in Learn Concurrent Programming with Go

A dynamic linear pipeline is a one-directional processing chain that can grow by adding stages as the computation proceeds.

A dynamic linear pipeline is a one-directional chain of goroutines that grows as computation discovers new stages. First-class channels make stages and channel connections transferable between functions. section 9.2.7

Generating prime numbers

A goroutine sends sequential candidates from 2 onward. Each filter receives the first number as its prime, discards its multiples, and creates the next filter when another number survives. Closing the input eventually closes the chain and signals completion. section 9.2.7

How Learn Concurrent Programming with Go covers it

How deep it goes
Explains recursive stage creation, filtering, input closure, and completion signaling, while simplifying primality checks.
Examples
Uses an Eratosthenes-style prime sieve with sequential candidates and filters for 2, 3, 5, and later primes.
What it assumes
Assumes basic Go channels and goroutines while simplifying primality testing to keep the pipeline implementation concise.
What you can do after
Build it from scratch in Go using recursive filter goroutines, transferable channels, input closure, and a quit signal.
How it connects
Connects channels, goroutines, CSP pipelines, message passing, and prime-number filtering.

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.