Discover Packages
github.com/rhagenson/unchan
package
module
Version:
v0.0.0-...-237187e
Opens a new window with list of versions in this module.
Published: Jul 30, 2019
License: BSD-3-Clause
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
unchan
unchan is the unordered channel. Although typical desire when using a Go channel is to maintain order, there are some instances when that order is not the goal.
Expand ▾
Collapse ▴
Documentation
¶
Unchan is an unordered channel.
Values that are sent are received in any order.
New generates a new unordered channel of given length/capacity.
Cap is the maximum number of values the channel can hold.
Len is the current number of values in the channel.
func (c *Unchan ) Receive() interface{}
Receive pulls a value out of the channel.
func (c *Unchan ) Send(v interface{})
Send pushes a value down the channel.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.