Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AfterStopper ¶
type AfterStopper interface {
Stop() bool
}
func After ¶
func After(q cellnetEx.EventQueue, duration time.Duration, callbackObj interface{}, context interface{}) AfterStopper
在给定的duration持续时间后, 执行callbackObj对象类型对应的函数回调 q: 队列,在指定的队列goroutine执行, 空时,直接在当前goroutine context: 将context上下文传递到带有context指针的函数回调中
type Loop ¶
type Loop struct { Context interface{} Duration time.Duration Queue cellnetEx.EventQueue // contains filtered or unexported fields }
轻量级的持续Tick循环
func NewLoop ¶
func NewLoop(q cellnetEx.EventQueue, duration time.Duration, notifyCallback func(*Loop), context interface{}) *Loop
执行一个循环, 持续调用callback, 周期是duration context: 将context上下文传递到带有context指针的函数回调中
func (*Loop) NotifyFunc ¶
func (*Loop) SetNotifyFunc ¶
Click to show internal directories.
Click to hide internal directories.