tasks

package
v1.0.86 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2019 License: BSD-2-Clause Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DONE = struct{}{}

Functions

This section is empty.

Types

type TaskFunc

type TaskFunc func(start chan<- struct{}, stop <-chan struct{}) error

type Tasks

type Tasks struct {
	sync.WaitGroup
	// contains filtered or unexported fields
}

func (*Tasks) Close

func (this *Tasks) Close() error

Close sends done signals to each go routine and will return any error from the tasks. Each go routine may end before the 'stop' signal is returned...

func (*Tasks) Start

func (this *Tasks) Start(funcs ...TaskFunc)

Start tasks in the background and waits for all "start" signals to be returned before unblocking

Jump to

Keyboard shortcuts

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