liveBook · Manning

Fork-join model

The fork-join model is a parallel computation pattern that divides work into concurrent subtasks and combines their results.

How 2 Manning books explain it

Grokking Concurrency

The fork/join pattern divides a problem into independent subtasks, processes them concurrently, and combines their results into the overall solution.

How it is used
Structures concurrent applications by dividing independently processable data into subtasks and aggregating their results.
How deep it goes
Explains the fork and join stages, parallel-versus-sequential work, and task granularity without descending into runtime internals.
Examples
Uses ballot piles, staff members, candidate summaries, and Python vote-counting implementations as concrete examples.
What you can do after
Apply it to split independent data chunks, process them concurrently, and combine their results.

Read how Grokking Concurrency explains fork-join model →

Learn Concurrent Programming with Go

Fork/join is a concurrency pattern that performs parallel subtasks and then combines their results in a final join step.

How it is used
Applies parallel execution when independent subtasks produce results that must be merged in a final step.
How deep it goes
Explains the pattern through goroutines, channels, WaitGroup coordination, channel closure, and maximum-result selection.
Examples
Uses recursive directory scanning and curly-brace counting to identify the Go file with the deepest nested code block.
What you can do after
Build it from scratch: parallelize independent file scans, coordinate completion, close the results channel, and select the aggregate result.

Read how Learn Concurrent Programming with Go explains fork-join model →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.