Render

Binary Heap

A priority queue, demoing the p/moul/x/daily/heap library.

The workload

jobpriority
send email5
pay invoice1
backup db3
rotate keys1
clear cache9

Min-heap — lowest priority first

#jobpriority
1pay invoice1
2rotate keys1
3backup db3
4send email5
5clear cache9

Max-heap — highest priority first

#jobpriority
1clear cache9
2send email5
3backup db3
4pay invoice1
5rotate keys1

Ties

pay invoice and rotate keys share priority 1. Both heaps pop them oldest-first: the tiebreak is insertion order and does not invert with the heap kind.

Without a total order, two nodes could pop equal-priority items in different sequences and render different pages — a consensus bug, not a cosmetic one.

Transactions

Calls, deploys, and child packages · indexed history

No indexed transactions for this realm yet.

Call function

No qfuncs for this package · calls stay disabled

Source (qfile)