Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Ants ¶
type Ants struct {
// contains filtered or unexported fields
}
Ants 是使用 ants.Pool 作为分发器的实现,当 ants.Pool 无法使用时会退化为 goroutine 处理
type Dispatcher ¶
type Dispatcher interface {
Dispatch(f func())
}
Dispatcher 是用于分发邮箱消息的接口,不同的实现可以用于不同的场景
- 通常分发器应该作为单例提供,当无法满足时应做出说明
func NewGoroutine ¶
func NewGoroutine() Dispatcher
Click to show internal directories.
Click to hide internal directories.