summaryrefslogtreecommitdiff
path: root/pkg/priority_queue/binary_heap.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-07-11 19:54:35 +0300
committerValery Piashchynski <[email protected]>2021-07-11 19:54:35 +0300
commit0f70f1e2311640236d74a0a237536779d8d44223 (patch)
tree8b2e9dc32b5b6bafe418083c33cce3dbb8f277c7 /pkg/priority_queue/binary_heap.go
parent240b114e1ea3c1414bcd9f4d2c050d56c467222f (diff)
Update JOBS interface, Renamed Consume -> Run.
Add DYNAMIC declaration of the pipelines. Update Jobs constructor interface, add FromPipeline method to construct jobs driver (unique) via the `Declare` RPC call. Add `Stop` method to gracefully stop all consumers. Binary heaps `GetMax` to canonical `ExtractMin`. Other small improvements. Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'pkg/priority_queue/binary_heap.go')
-rw-r--r--pkg/priority_queue/binary_heap.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/priority_queue/binary_heap.go b/pkg/priority_queue/binary_heap.go
index e47dd2c8..514ca460 100644
--- a/pkg/priority_queue/binary_heap.go
+++ b/pkg/priority_queue/binary_heap.go
@@ -104,7 +104,7 @@ func (bh *BinHeap) Insert(item Item) {
bh.cond.Signal()
}
-func (bh *BinHeap) GetMax() Item {
+func (bh *BinHeap) ExtractMin() Item {
bh.cond.L.Lock()
// if len == 0, wait for the signal