Parallel Computing Patterns

Patterns that involve running multiple independent tasks concurrently to improve performance.

1. Worker Pool

Limits concurrency by reusing a fixed number of goroutines to process tasks.

2. Queuing

Buffers tasks for controlled, sequential or concurrent processing.

3. Parallel For Loop

Runs loop iterations concurrently using goroutines.

4. Map-Reduce

Distributes tasks across multiple workers and aggregates results.

5. Future (Promise)

Represents a value that will be available at some point in the future, allowing asynchronous computation.

6. Error Group

Runs goroutines in parallel with error handling and cancellation.


Table of contents


This site is open source! You can contribute or suggest changes by editing the GitHub repository.
Copyright © 2025. Distributed by an MIT license.