/PriorityQueue

Priority Queue implementation on Go. FIFO, Concurrency safe.

Primary LanguageGo

PriorityQueue Build Status

Priority Queue implementation on Go.

  1. On top of native heap
  2. Multithread access safe (using mutex)
  3. Fifo

Usage

//make queue
q := PriorityQueue.Build()

//push
pr: = 1
q.Push(something.(interface{}), pr)

//pull
somethingWithHightPr := q.Pull()

Usage, prioritize channels

//ins - []chan interface{}
out := PriorityQueue.Prioritize(ins...)

example