Discover Packages
github.com/vera-byte/vera_im_lib
pkg
pool
package
Version:
v1.1.17
Opens a new window with list of versions in this module.
Published: Oct 31, 2024
License: Apache-2.0
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
type Collector struct {
Work chan *Job
}
type Job struct {
Data interface{}
JobFunc JobFunc
}
type JobFunc func(id int64 , data interface{})
func (e *Queue ) Pop() (v interface{})
Pop 取出队列,(阻塞模式)
func (e *Queue ) Push(v interface{})
func (e *Queue ) TryPop() (v interface{}, ok bool )
试着取出队列(非阻塞模式)返回ok == false 表示空
type Worker struct {
ID int64
WorkerChannel chan chan *Job
Channel chan *Job
End chan struct{}
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.