Documentation
¶
Overview ¶
Package queue provides generic queues.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Queue ¶
type Queue interface { Put(interface{}) PutAll(...interface{}) First() interface{} All() []interface{} Size() int }
Queue is a "First In, First Out" buffer.
func New ¶
New returns a new queue. If capacity is negative, capacity is set to zero. If capacity is zero, queue is initialized with capacity of 8 at first write.
func NewSynchronized ¶
NewSynchronized returns a new thread safe queue. If capacity is negative, capacity is set to zero. If capacity is zero, queue is initialized with capacity of 8 at first write.
Click to show internal directories.
Click to hide internal directories.