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()
Click to show internal directories.
Click to hide internal directories.