concurrency

package
v0.0.0-...-6c0d317 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 15, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AndShutdown

func AndShutdown(inputs ...<-chan int) <-chan int

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)

func DealWith

func DealWith(done chan struct{}, data <-chan time.Time, out chan<- struct{})

func Merge

func Merge(input ...chan int) chan int

Merge combines input from multiple channels into a single channel

func OrShutdown

func OrShutdown(inputs ...<-chan int) <-chan int

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)

func Pipeline

func Pipeline(input chan int, filters ...func(task int) bool) chan int

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

func Pool

func Pool(shutdown <-chan int, input <-chan int, poolSize int, process func(int) int) <-chan int

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

func Range

func Range()

func SetNode

func SetNode()

func Split

func Split(input chan int, outputs ...chan int)

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

func SplitRnd

func SplitRnd(input chan int, outputs ...chan int)

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

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL