Documentation ¶
Overview ¶
Package queue is a FIFO queue using the circularly linked list package in Go's standard library. There is also a thread safe version.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AsyncQueue ¶
type AsyncQueue struct {
// contains filtered or unexported fields
}
A thread safe version of Queue.
func (AsyncQueue) Front ¶
func (q AsyncQueue) Front() *list.Element
Same as Front for Queue, except it is thread safe.
func (AsyncQueue) IsEmpty ¶
func (q AsyncQueue) IsEmpty() bool
Same as IsEmpty for Queue, except it is thread safe.
func (AsyncQueue) Len ¶
func (q AsyncQueue) Len() int
Same as Len for Queue, except it is thread safe.
func (AsyncQueue) Next ¶
func (q AsyncQueue) Next(e *list.Element) *list.Element
Same as Next for Queue, except it is thread safe.
func (AsyncQueue) Pop ¶
func (q AsyncQueue) Pop() interface{}
Same as Pop for Queue, except it is thread safe.
func (AsyncQueue) Push ¶
func (q AsyncQueue) Push(o interface{})
Same as Push for Queue, except it is thread safe.
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
Queue represents the FIFO queue.
func (Queue) Front ¶
Returns the item at the front of the Queue or nil. The item is a *list.Element from the 'container/list' package.
func (Queue) Next ¶
Returns the item after e or nil it is the last item or nil. The item is a *list.Element from the 'container/list' package. Even though it is possible to call e.Next() directly, don't. This behavior may not be supported moving forward.