concurrent

package
v0.0.0-...-4aef51c Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2018 License: Apache-2.0, Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const StopSignal = "STOP!"

Variables

View Source
var GlobalUnboundedExecutor = NewUnboundedExecutor()

GlobalUnboundedExecutor has the life cycle of the program itself any goroutine want to be shutdown before main exit can be started from this executor

View Source
var LogInfo = func(event string, properties ...interface{}) {
}
View Source
var LogPanic = func(recovered interface{}, properties ...interface{}) interface{} {
	fmt.Println(fmt.Sprintf("paniced: %v", recovered))
	debug.PrintStack()
	return recovered
}

Functions

This section is empty.

Types

type Executor

type Executor interface {
	Go(handler func(ctx context.Context))
}

type Map

type Map struct {
	sync.Map
}

func NewMap

func NewMap() *Map

type UnboundedExecutor

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

func NewUnboundedExecutor

func NewUnboundedExecutor() *UnboundedExecutor

func (*UnboundedExecutor) Go

func (executor *UnboundedExecutor) Go(handler func(ctx context.Context))

func (*UnboundedExecutor) Stop

func (executor *UnboundedExecutor) Stop()

func (*UnboundedExecutor) StopAndWait

func (executor *UnboundedExecutor) StopAndWait(ctx context.Context)

func (*UnboundedExecutor) StopAndWaitForever

func (executor *UnboundedExecutor) StopAndWaitForever()

Jump to

Keyboard shortcuts

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