semaphore

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2019 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 AcquireGuard

type AcquireGuard struct {
	// contains filtered or unexported fields
}

func (*AcquireGuard) Release

func (g *AcquireGuard) Release()

type S

type S struct {
	// contains filtered or unexported fields
}

func New

func New(max int64) *S

func (*S) Acquire

func (s *S) Acquire(ctx context.Context) (*AcquireGuard, error)

The returned AcquireGuard is not goroutine-safe.

Jump to

Keyboard shortcuts

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