Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
Queue is a basic FIFO queue.
func (*Queue) Close ¶
Close closes the queue. Use this to release all PopBlocking calls. The queue will be emptied before PopBlocking returns false.
func (*Queue) Next ¶ added in v0.1.1
Next blocks until an element is available or the queue is closed. Reports false if the queue has been emptied and is closed. Beware that if multiple goroutines read from the queue, Pop can return false after Next was true.
func (*Queue) Pop ¶
Pop removes and returns a node from the queue. The bool value is false if the queue was empty.
func (*Queue) PopBlocking ¶
PopBlocking removes and returns a node from the queue. It blocks until an element is available or the queue is closed. The bool value is false if the queue has been emptied and was closed.