Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Queue ¶
type Queue struct { PushCallback func(interface{}) PopCallback func(interface{}) // contains filtered or unexported fields }
Queue is a thread-safe FIFO queue data structure
func (*Queue) Pop ¶
func (c *Queue) Pop() interface{}
Pop removes the front element of l and returns it. If the queue is empty, Pop waits for a new element to be enqueued, removes it and returns the value
func (*Queue) Push ¶ added in v0.10.0
func (c *Queue) Push(v interface{})
Push inserts a new element e with value v to the back of queue c
Click to show internal directories.
Click to hide internal directories.