From 0f70f1e2311640236d74a0a237536779d8d44223 Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Sun, 11 Jul 2021 19:54:35 +0300 Subject: 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 --- pkg/priority_queue/binary_heap.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/priority_queue/binary_heap.go') 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 -- cgit v1.2.3