startgroup

package
v0.0.0-...-a9ff0e8 Latest Latest
Warning

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

Go to latest
Published: May 13, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package startgroup provides a single synchronization primitive the StartGroup.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StartGroup

type StartGroup interface {
	//  Release all Waiting goroutines
	Release()

	// Wait for a release event
	Wait()

	// Wait for a release event for up to a timeout
	TimedWait(timeout time.Duration) bool
}

A StartGroup provides a mechanism for a collection of goroutines to wait for a release event. When released, all blocked routines simultaneously.

A typical use is when multiple routines need to know when a resource is available but do not need exclusive access to the resource.

func MakeStartGroup

func MakeStartGroup() StartGroup

Create a StartGroup.

Jump to

Keyboard shortcuts

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