Documentation
¶
Index ¶
- type Pool
- func (p Pool) Capacity() int
- func (p *Pool) Exchange(size uint) bool
- func (p *Pool) Free()
- func (p Pool) IsIdle() bool
- func (p *Pool) Pull() interface{}
- func (p *Pool) PullSync() interface{}
- func (p *Pool) Push(i interface{}) int
- func (p *Pool) PushSlice(s []interface{}) int
- func (p Pool) Size() int
- type Queue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pool ¶
type Pool struct { Cap int Chan chan interface{} // contains filtered or unexported fields }
Pool the Queue instance.
func (*Pool) Exchange ¶
Exchange returns boolean, if exchanges queue capacity with size successfully. returns fail if length of queue large than size.
func (*Pool) PullSync ¶
func (p *Pool) PullSync() interface{}
PullSync returns the first item of queue, nil if queue is empty.
Click to show internal directories.
Click to hide internal directories.