diff options
Diffstat (limited to 'pkg/priority_queue/pq.go')
-rw-r--r-- | pkg/priority_queue/pq.go | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/pkg/priority_queue/pq.go b/pkg/priority_queue/pq.go deleted file mode 100644 index 2ff52a79..00000000 --- a/pkg/priority_queue/pq.go +++ /dev/null @@ -1,30 +0,0 @@ -package priorityqueue - -import ( - "sync" - - priorityqueue "github.com/spiral/roadrunner/v2/common/priority_queue" -) - -type PQ struct { - sync.RWMutex - bh *BinHeap -} - -func NewPriorityQueue() *PQ { - return &PQ{ - bh: NewBinHeap(), - } -} - -func (p *PQ) GetMax() priorityqueue.Item { - p.Lock() - defer p.Unlock() - return p.bh.GetMax() -} - -func (p *PQ) Insert(item priorityqueue.Item) { - p.Lock() - p.bh.Insert(item) - p.Unlock() -} |