Skip to content

Library implementing various concurrency patterns (Fan-out, Fan-in, Pooling etc)

License

Notifications You must be signed in to change notification settings

dsinecos/go-concurrency-patterns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Motivation

I wrote this pkg to understand Golang's concurrency constructs (Goroutines, Channels, Select-case etc) by implementing different concurrency patterns.

Documentation

You can read the annotated code here

Concurrency Patterns

Merge

Merge combines input from multiple channels into a single channel

Split

Split broadcasts (duplicates) input from a single channel across multiple output channels

SplitRnd

SplitRnd distributes input from a single channel across multiple output channels randomly

Pipeline

Pipeline recursively creates a multi-stage asynchronous pipeline to filter values from the input channel in order of the functions provided and publish qualifying values to the output channel

OrShutdown

OrShutdown combines multiple signalling channels and returns a single signalling channel (The output channel is closed if any of the input signalling channels is closed)

AndShutdown

AndShutdown combines multiple signalling channels and returns a single signalling channel (The output channel is closed when all of the input signalling channels are closed)

Pool

Pool invokes multiple goroutines to process values on the input channel concurrently

Resources

About

Library implementing various concurrency patterns (Fan-out, Fan-in, Pooling etc)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages