Documentation ¶
Index ¶
- type MyQueue
- func (q *MyQueue) Close()
- func (q *MyQueue) IsClose() bool
- func (q *MyQueue) Len() int
- func (q *MyQueue) Pop() (v interface{})
- func (q *MyQueue) Push(v interface{})
- func (q *MyQueue) TryPop() (v interface{}, ok bool)
- func (q *MyQueue) TryPopTimeout(tm time.Duration) (v interface{}, ok bool)
- func (q *MyQueue) Wait()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MyQueue ¶
MyQueue queue
func (*MyQueue) Close ¶
func (q *MyQueue) Close()
Close MyQueue After close, Pop will return nil without block, and TryPop will return v=nil, ok=True
func (*MyQueue) TryPopTimeout ¶
TryPopTimeout 试着取出队列(塞模式+timeout)返回ok == false 表示超时
Click to show internal directories.
Click to hide internal directories.