dam

package
v0.0.0-...-9ca37e5 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2018 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dam

type Dam interface {
	// Flush flushes all channels and return the number of flushed channels
	Flush(err error) uint32

	// Wait blocks until the dam is flushed
	Wait() error

	// Chan returns a channel that's written to when the dam is flushed
	Chan() chan error
}

Dam represents a goroutine dam

func New

func New(cap int) Dam

New constructs a new dam with the given preallocated capacity

Jump to

Keyboard shortcuts

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