Documentation ¶
Index ¶
- type Function
- type Goper
- type Handler
- type Pool
- func (mgr *Pool) Close(name string)
- func (p *Pool) Default(name string, maxgo int, hd Handler) error
- func (p *Pool) Get(name string) (t Worker, ok bool)
- func (p *Pool) Groud(name string, maxgo int) error
- func (mgr *Pool) GroupPut(name string, fn Function) error
- func (mgr *Pool) Put(name string, arg interface{}) error
- func (p *Pool) Register(name string, w Worker) error
- func (mgr *Pool) Shutdown()
- type Worker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Goper ¶
type Goper struct {
// contains filtered or unexported fields
}
Goper a simple half sync half async goroutine pool.
equire to go func(). Goper is safety to close all goroutine before done the task using Put() to channal.
func (*Goper) Close ¶
func (g *Goper) Close()
Close() stop runner, wait for all work and goroutine finish.
type Pool ¶ added in v1.1.0
type Pool struct {
// contains filtered or unexported fields
}
Pool goper pool
func (*Pool) Put ¶ added in v1.1.0
Put send i to name's worker or group. if to group,arg must be Function type.
Click to show internal directories.
Click to hide internal directories.