runtine

package
v0.0.0-...-a01428d Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SafeRuntine

type SafeRuntine struct {

	//SafeRuntine的运行函数里可以通过接收IsInterrupt chan来判断是否要安全退出
	//调用都可以调用Stop便可以安全退出
	//例如:
	//runtine.Go(func(r *runtine.SafeRuntine){
	//		select{
	//			case <-r.IsInterrupt:
	//		}
	//)
	//
	IsInterrupt chan bool
	// contains filtered or unexported fields
}

func (*SafeRuntine) Go

func (o *SafeRuntine) Go(fn func(args ...interface{}), args ...interface{})

同步启动runtine,直到runtine被执行

func (*SafeRuntine) IsStoped

func (this *SafeRuntine) IsStoped() bool

func (*SafeRuntine) Stop

func (this *SafeRuntine) Stop()

Jump to

Keyboard shortcuts

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