Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

README.md

Thread-safe circular queue for Go

GoDoc

Installation

go get github.com/Mottl/circularqueue

Example

package main
  
import (
    "fmt"
    "github.com/Mottl/circularqueue"
)

func main() {
    queue := circularqueue.NewQueue(64)
    queue.Push(100)
    queue.Push(101)
    queue.Push(102)
    queue.Push(103)
    queue.PopAt(1)     // 101, nil
    queue.Pop()        // 103, nil
    fmt.Println(queue) // Queue (len=2, cap=64) [ 100, 102 ]
}

License

Use of this package is governed by MIT license that can be found in the LICENSE file.

About

Go package circularqueue implements a thread-safe circular queue

Topics

Resources

License

Releases

No releases published

Packages

No packages published

Languages

You can’t perform that action at this time.