go_queue

package module
v0.0.0-...-9a435dc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 20, 2021 License: Apache-2.0 Imports: 3 Imported by: 1

README

go_queue

go_queue

package main

import (
	"fmt"

	"github.com/sun-moon-star-star/go_queue"
)

func main() {
	queue := go_queue.New()

	queue.Append("sun-moon-star-star")

	len := queue.Len()

	element := queue.Remove()
	queue.Done()

	elementString := element.(string)

	fmt.Println(len, elementString)
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConcurrentQueue

type ConcurrentQueue struct {
	// contains filtered or unexported fields
}

func NewConcurrentQueue

func NewConcurrentQueue() *ConcurrentQueue

func (*ConcurrentQueue) Append

func (q *ConcurrentQueue) Append(item interface{}) error

func (*ConcurrentQueue) Back

func (q *ConcurrentQueue) Back() interface{}

func (*ConcurrentQueue) BackNoBlocked

func (q *ConcurrentQueue) BackNoBlocked() interface{}

func (*ConcurrentQueue) Front

func (q *ConcurrentQueue) Front() interface{}

func (*ConcurrentQueue) FrontNoBlocked

func (q *ConcurrentQueue) FrontNoBlocked() interface{}

func (*ConcurrentQueue) Len

func (q *ConcurrentQueue) Len() int

func (*ConcurrentQueue) Remove

func (q *ConcurrentQueue) Remove() interface{}

func (*ConcurrentQueue) RemoveNoBlocked

func (q *ConcurrentQueue) RemoveNoBlocked() interface{}

func (*ConcurrentQueue) SetMaxLen

func (q *ConcurrentQueue) SetMaxLen(maxLen int)

type Queue

type Queue struct {
	// contains filtered or unexported fields
}

func New

func New() *Queue

func (*Queue) Append

func (q *Queue) Append(item interface{}) error

func (*Queue) Done

func (q *Queue) Done()

func (*Queue) Join

func (q *Queue) Join()

func (*Queue) Len

func (q *Queue) Len() int

func (*Queue) Remove

func (q *Queue) Remove() interface{}

func (*Queue) SetMaxLen

func (q *Queue) SetMaxLen(maxLen int)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL