Ecosyste.ms: Packages

An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 5.2% on proxy.golang.org
Top 4.2% dependent packages on proxy.golang.org
Top 4.7% dependent repos on proxy.golang.org
Top 8.2% forks on proxy.golang.org
Top 1.7% docker downloads on proxy.golang.org

proxy.golang.org : golang.design/x/chann

Package chann providesa a unified channel package. The package is compatible with existing buffered and unbuffered channels. For example, in Go, to create a buffered or unbuffered channel, one uses built-in function `make` to create a channel: However, all these channels have a finite capacity for caching, and it is impossible to create a channel with unlimited capacity, namely, an unbounded channel. This package provides the ability to create all possible types of channels. To create an unbuffered or a buffered channel: More importantly, when the capacity of the channel is unspecified, or provided as negative values, the created channel is an unbounded channel: Furthermore, all channels provides methods to send (In()), receive (Out()), and close (Close()). Note that to close a channel, must use Close() method instead of the language built-in method Two additional methods: ApproxLen and Cap returns the current status of the channel: an approximation of the current length of the channel, as well as the current capacity of the channel. See https://golang.design/research/ultimate-channel to understand the motivation of providing this package and the possible use cases with this package.

Registry - Source - Documentation - JSON
purl: pkg:golang/golang.design/x/chann
Keywords: channels, generics, golang, unbounded-channel
License: MIT
Latest release: about 2 years ago
First release: over 2 years ago
Namespace: golang.design/x
Dependent packages: 2
Dependent repositories: 1
Stars: 26 on GitHub
Forks: 5 on GitHub
Docker dependents: 1
Docker downloads: 40
See more repository details: repos.ecosyste.ms
Last synced: 29 days ago

    Loading...
    Readme
    Loading...