Skip to content

cobusc/erlang_priority_queue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

Erlang Priority Queue

A priority queue implementation in Erlang based on Ulf Wiger's comments here.

The priority queue is based on an ordered_set disc_copy table in mnesia.

Keys are constructed as {PriorityLevel::non_neg_integer(), erlang:now()}, which means that entries will be sorted by priority level first, then by insertion time. This avoids possible starvation of entries within a specific priority level.

Priority level 0 is the highest priority, with higher valued levels having lower priority.

Inserts are O(log N). Retrievals are O(1).

Access is serialized via a gen_server.

About

A priority queue implementation in Erlang

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages