Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CQueue ¶
type CQueue struct {
// contains filtered or unexported fields
}
CQueue is a concurrent unbounded queue which uses two-Lock concurrent queue qlgorithm.
type LKQueue ¶
type LKQueue struct {
// contains filtered or unexported fields
}
func NewLKQueue ¶
func NewLKQueue() *LKQueue
type SliceQueue ¶
type SliceQueue struct {
// contains filtered or unexported fields
}
SliceQueue is an unbounded queue which uses a slice as underlying.
func NewSliceQueue ¶
func NewSliceQueue(n int) (q *SliceQueue)
NewSliceQueue returns an empty queue. You can give a
func (*SliceQueue) Dequeue ¶
func (q *SliceQueue) Dequeue() interface{}
Dequeue removes and returns the value at the head of the queue. It returns nil if the queue is empty.
func (*SliceQueue) Enqueue ¶
func (q *SliceQueue) Enqueue(v interface{})
Enqueue puts the given value v at the tail of the queue.
Click to show internal directories.
Click to hide internal directories.