Skip to content

A wrapper for Erlang's :queue. Build First In, First Out queues.

Notifications You must be signed in to change notification settings

mrdougwright/queue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Queue

This is a simple wrapper around Erlang's :queue module. Unlike other wrappers, this provides a simple interface for dealing with First In, First Out FIFO queues.

Examples

Queue.new(:q)
=> {:ok, pid}

Queue.push(:q, 1)
Queue.push(:q, 2)
Queue.push(:q, ["a", "b"])
Queue.push(:q, 3)
=> :ok

Queue.pop(:q)
=> 1

Queue.queue(:q)
=> [3, ["a", "b"], 2]

Queue.delete(:q)
:ok

Docs can be found at https://hexdocs.pm/queue.

Installation

Available as Hex package (aka an Elixir Drop), the package can be installed by adding queue to your list of dependencies in mix.exs:

def deps do
  [
    {:queue, "~> 0.1.0"}
  ]
end

Contributing

Ideas or improvements? Please submit a Github issue. To submit a PR, please fork this repo first.

About

A wrapper for Erlang's :queue. Build First In, First Out queues.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages