Skip to content

Latest commit

 

History

History
29 lines (21 loc) · 580 Bytes

README.md

File metadata and controls

29 lines (21 loc) · 580 Bytes

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