sort-in-topological-order: use prio-queue