killchan

package
v0.0.0-...-eb6d389 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2016 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 Killchan

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

A Killchan is a chan struct{} that can be closed multiple times without panicing.

func New

func New() *Killchan

Return a new killchan.

func (*Killchan) Alive

func (kc *Killchan) Alive() bool

Return true if the channel is still alive, false if it has been killed.

func (*Killchan) Chan

func (kc *Killchan) Chan() <-chan struct{}

Return the channel.

func (*Killchan) Kill

func (kc *Killchan) Kill() bool

Kill the channel. Returns true if the channel has been killed, false if it had already been killed previously.

func (*Killchan) Wait

func (kc *Killchan) Wait()

Wait for the channel to be killed.

Jump to

Keyboard shortcuts

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