semaphore

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2017 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Semaphore

type Semaphore struct {
	*errgroup.Group
	// contains filtered or unexported fields
}

Semaphore provides golang.org/x/sync/errgroup.Group with limited concurrency.

func New

func New(n int) *Semaphore

New returns a new semaphore with the given limited concurrency.

func (*Semaphore) Go

func (s *Semaphore) Go(fn func() error)

Go calls the given function in a new goroutine.

Jump to

Keyboard shortcuts

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