Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConcurrentQueue ¶
type ConcurrentQueue struct {
// contains filtered or unexported fields
}
ConcurrentQueue - A queue which is go-routine safe
func (*ConcurrentQueue) Dequeue ¶
func (mq *ConcurrentQueue) Dequeue() (interface{}, bool)
func (*ConcurrentQueue) Enqueue ¶
func (mq *ConcurrentQueue) Enqueue(item interface{})
func (*ConcurrentQueue) Len ¶
func (mq *ConcurrentQueue) Len() int
func (*ConcurrentQueue) WaitForItem ¶
func (mq *ConcurrentQueue) WaitForItem() interface{}
type Queue ¶
type Queue interface {
// EnQueue an element to the queue
Enqueue(item interface{})
// DeQueue an element from the queue
Dequeue() (interface{}, bool)
// Return the length of the underlying queue
Len() int
// Wait until an item in the underlying queue is ready
// Once an item is available. Dequeue this item and return it
WaitForItem() interface{}
}
Queue - An interface to queues
Click to show internal directories.
Click to hide internal directories.