Creates an empty PriorityQueue with the given comparison function.
The comparator determines priority: the element for which comparator returns the smallest value is dequeued first.
The optional equal_func is used by contains() and remove() for element comparison. For string elements, pass GLib.str_equal. If null, pointer equality is used.
Example:
var pq = new PriorityQueue<string> ((a, b) => {
return strcmp (a, b);
}, GLib.str_equal);
assert (pq.isEmpty ());
| comparator |
the comparison function for ordering. |
| equal_func |
the equality function for element comparison, or null for pointer equality. |