Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Nonblocking decides what to do when submitting a new task to a full worker pool: waiting for a available worker // or returning nil directly. Nonblocking = true // ExpiryDuration is the interval time to clean up those expired workers. ExpiryDuration = 10 * time.Second // DefaultAntsPoolSize sets up the capacity of worker pool, 1024 * cpu. DefaultAntsPoolSize = (1 << 10) * runtime.NumCPU() * 2 )
View Source
var GoroutinePool = func() func() Pool { var pool Pool once := sync.Once{} options := ants.Options{ Nonblocking: Nonblocking, ExpiryDuration: ExpiryDuration, } return func() Pool { once.Do(func() { pool, _ = ants.NewPool( DefaultAntsPoolSize, ants.WithOptions(options), ) }) return pool } }()
Functions ¶
This section is empty.
Types ¶
type Broadcast ¶ added in v1.1.1
type Broadcast struct {
// contains filtered or unexported fields
}
func NewBroadcast ¶ added in v1.1.1
func (*Broadcast) RegisterConn ¶ added in v1.1.1
func (self *Broadcast) RegisterConn(c gnet.Conn)
func (*Broadcast) SendMessage ¶ added in v1.1.1
func (*Broadcast) WriteOffConn ¶ added in v1.1.1
func (self *Broadcast) WriteOffConn(c gnet.Conn)
type PoolWithFunc ¶
type PoolWithFunc = *ants.PoolWithFunc
type WebSocketWrapper ¶ added in v1.1.1
type WebSocketWrapper struct {
// contains filtered or unexported fields
}
func NewWebSocketWrapper ¶ added in v1.1.1
func NewWebSocketWrapper() *WebSocketWrapper
func (*WebSocketWrapper) Flush ¶ added in v1.1.1
func (self *WebSocketWrapper) Flush() error
func (*WebSocketWrapper) SubPackage ¶ added in v1.1.1
func (self *WebSocketWrapper) SubPackage() []byte
Directories ¶
Path | Synopsis |
---|---|
Package cron implements a cron spec parser and job runner.
|
Package cron implements a cron spec parser and job runner. |
example-app
|
|
net-protocol
|
|
Click to show internal directories.
Click to hide internal directories.