nbc

package
v0.0.0-...-f0721d9 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2019 License: GPL-3.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NonBlockingChan

type NonBlockingChan struct {
	Send chan<- interface{}
	Recv <-chan interface{}
	// contains filtered or unexported fields
}

Special type that mimics the behavior of a channel but does not block when items are sent. Items are stored internally until received. Closing the Send channel will cause the Recv channel to be closed after all items have been received.

func New

func New() *NonBlockingChan

Create a new non-blocking channel.

func (*NonBlockingChan) Len

func (n *NonBlockingChan) Len() int

Retrieve the number of items waiting to be received.

Jump to

Keyboard shortcuts

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