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 cellnet.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 cellnet.EventQueue // contains filtered or unexported fields }
轻量级的持续Tick循环
Click to show internal directories.
Click to hide internal directories.