Documentation
¶
Overview ¶
Package queue
(C) Copyright Alex Gaetano Padula
Licensed under the Mozilla Public License, v. 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
https://www.mozilla.org/en-US/MPL/2.0/
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
Node represents a node in the queue
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
Queue implements a concurrent non-blocking queue
func (*Queue) Dequeue ¶
func (q *Queue) Dequeue() interface{}
Dequeue removes and returns a value from the queue Returns nil if the queue is empty
func (*Queue) Enqueue ¶
func (q *Queue) Enqueue(value interface{})
Enqueue adds a value to the queue
func (*Queue) List ¶
func (q *Queue) List() []interface{}
List returns a slice of all values in the queue